gpt4 book ai didi

python-3.x - macOS Monterey - 安装 Scipy 错误 "No lapack/blas resources found"

转载 作者:行者123 更新时间:2023-12-05 02:33:22 27 4
gpt4 key购买 nike

我已经使用 brew install pyenv 在 Mac 上安装了 pyenv。我想运行一个需要安装 scipy==1.5.4 的 python 项目。我尝试使用命令 pip3 install scipy==1.5.4 安装它,但出现错误 No lapack/blas resources found

为了解决这个问题,我按照错误和其他解决方案中的建议运行了以下命令。

brew 安装 openblas

其次是:

export LDFLAGS="-L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/openblas/include"
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"

接下来我做了

brew install lapack  

紧随其后

export LDFLAGS="-L/usr/local/opt/lapack/lib"
export CPPFLAGS="-I/usr/local/opt/lapack/include"
export PKG_CONFIG_PATH="/usr/local/opt/lapack/lib/pkgconfig"

现在我已经安装了 blaslapack 我希望错误消失,但我仍然面临类似的错误。我该如何解决这个问题?

附言

完全错误

    Running from SciPy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE

openblas_lapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE

openblas_clapack_info:
customize UnixCCompiler
customize UnixCCompiler
libraries openblas,lapack not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE

atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries tatlas,tatlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries tatlas,tatlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE

atlas_3_10_info:
customize UnixCCompiler
libraries satlas,satlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries satlas,satlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE

atlas_threads_info:
Setting PTATLAS=ATLAS
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE

atlas_info:
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries lapack_atlas not found in /Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/local/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/local/lib
customize UnixCCompiler
libraries f77blas,cblas,atlas not found in /usr/lib
customize UnixCCompiler
libraries lapack_atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE

/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
self.calc_info()
lapack_info:
customize UnixCCompiler
libraries lapack not found in ['/Users/furqan/.pyenv/versions/3.6.13/envs/venv/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE

/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
self.calc_info()
lapack_src_info:
NOT AVAILABLE

/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/system_info.py:624: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
self.calc_info()
NOT AVAILABLE

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 583, in <module>
setup_package()
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 579, in setup_package
setup(**metadata)
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-build-env-n8dln98w/lib/python3.6/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py", line 477, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.

----------------------------------------
Command "/Users/furqan/.pyenv/versions/3.6.13/envs/venv/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-record-uy6kggfm/install-record.txt --single-version-externally-managed --compile --install-headers /Users/furqan/.pyenv/versions/3.6.13/envs/venv/include/site/python3.6/scipy" failed with error code 1 in /private/var/folders/8p/qhqd9mgj7n93g_6snx_4y9rh0000gn/T/pip-install-x19xcozn/scipy/

最佳答案

我们在升级 Django 应用程序以使用 Python 3.8 时遇到了类似的问题。我们的解决方案来自 this github thread 。我们在 Big Sur 上运行,所以不确定相同的修复是否适用于您,但在您运行软件包安装之前运行 export SYSTEM_VERSION_COMPAT=1。同样,不确定这是否会在您的上下文中解决,但它对我们有用。

关于python-3.x - macOS Monterey - 安装 Scipy 错误 "No lapack/blas resources found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71006857/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com