[英]Problems installing SciPy on Python 3.10
This is the output I get when I try to pip install scipy
:这是我尝试pip install scipy
时得到的输出:
ERROR: Command errored out with exit status 1:
command: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py'"'"'; __file__='"'"'/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-record-axfypb45/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/scipy
cwd: /private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/
Complete output (107 lines):
/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py:114: DeprecationWarning: the imp module is deprecated in favour of importlib and slated for removal in Python 3.12; see the module's documentation for alternative uses
import imp
Note: if you need reliable uninstall behavior, then install
with pip instead of using `setup.py install`:
- `pip install .` (from a git repo or downloaded source
release)
- `pip install scipy` (last SciPy release on PyPI)
Running from scipy source directory.
lapack_opt_info:
lapack_mkl_info:
customize UnixCCompiler
libraries mkl_rt not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_lapack_info:
libraries openblas not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
openblas_clapack_info:
libraries openblas,lapack not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
flame_info:
libraries flame not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries tatlas,tatlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries lapack_atlas not found in /usr/local/lib
libraries tatlas,tatlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries tatlas,tatlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
libraries lapack_atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries satlas,satlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries lapack_atlas not found in /usr/local/lib
libraries satlas,satlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries satlas,satlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries lapack_atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries ptf77blas,ptcblas,atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries lapack_atlas not found in /usr/local/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries ptf77blas,ptcblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
libraries lapack_atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries f77blas,cblas,atlas not found in /Library/Frameworks/Python.framework/Versions/3.10/lib
libraries lapack_atlas not found in /usr/local/lib
libraries f77blas,cblas,atlas not found in /usr/local/lib
libraries lapack_atlas not found in /usr/lib
libraries f77blas,cblas,atlas not found in /usr/lib
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['/Library/Frameworks/Python.framework/Versions/3.10/lib', '/usr/local/lib', '/usr/lib']
NOT AVAILABLE
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858: 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.
return getattr(self, '_calc_info_{}'.format(name))()
lapack_src_info:
NOT AVAILABLE
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/distutils/system_info.py:1858: 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.
return getattr(self, '_calc_info_{}'.format(name))()
NOT AVAILABLE
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py", line 492, in <module>
setup_package()
File "/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py", line 488, in setup_package
setup(**metadata)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
File "/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py", line 395, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found. Note: Accelerate is no longer supported.
----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py'"'"'; __file__='"'"'/private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-install-swd6xkjh/scipy_53c3cdd4e8e2447f841731b3161ea9a3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/dm/ydr8mjcd4_z1snyrs0hzrd840000gn/T/pip-record-axfypb45/install-record.txt --single-version-externally-managed --compile --install-headers /Library/Frameworks/Python.framework/Versions/3.10/include/python3.10/scipy Check the logs for full command output.
Not sure totally what's going on, but I think Python is saying that I don't have BLAS and LAPACK libraries installed, but I am, getting the same error after having installed openblas and lapack using homebrew.不完全确定发生了什么,但我认为 Python 是说我没有安装 BLAS 和 LAPACK 库,但是我在使用自制软件安装 openblas 和 lapack 后遇到了同样的错误。 I am not understanding what error log is telling me.我不明白错误日志告诉我什么。
I am on MacOS Big Sur, and on a 2019 Macbook Pro 16 in. Model with Core i9 processor.我使用的是 MacOS Big Sur 和 2019 款 Macbook Pro 16 英寸型号,配备 Core i9 处理器。
I suppose this is caused because Scipy has no Python 3.10 support (yet), so trying to install it with that Python should fail somewhere.我想这是因为 Scipy 尚不支持 Python 3.10,因此尝试使用该 Python 安装它应该会在某处失败。
Consider using a lower Python version, or use Anaconda (like a user suggested).考虑使用较低的 Python 版本,或使用 Anaconda(如用户建议)。 Also, if you have the time, you can wait for the Scipy developers to release a compatible version (seems like they are fixing some issues related to that).此外,如果您有时间,您可以等待 Scipy 开发人员发布兼容版本(似乎他们正在修复一些与此相关的问题)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.