[英](Python/VS Code) Can't install scipy
我似乎無法使用 VS Code 安裝 scipy。
python -m pip install scipy 使用緩存的 scipy-1.5.2.tar.gz (25.4 MB) 收集 scipy 安裝構建依賴項...完成獲取構建輪子的要求...完成准備輪子元數據...錯誤錯誤:命令出錯退出狀態為 1:命令:'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\python.exe''C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib\\站點包\\pip_vendor\\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\\Users\\bundyjas\\AppData\\Local\\Temp\\tmpmkxabgvf' cwd: C:\\Users\\bundyjas\\AppData\\Local\\Temp\\pip-install-4lff13ycip-4lff13y48\\Complete輸出(195 行):setup.py:460: UserWarning: Unrecognized setuptools command ('dist_info --egg-base C:\\Users\\bundyjas\\AppData\\Local\\Temp\\pip-modern-metadata-j_sx_haa'),繼續生成 Cython 源並擴展模板 warnings.warn("Unrecognized setuptools command ('{}'), 繼續" 從 SciPy 源目錄運行。 lapack_opt_info: lapack_mkl_info: No module named numpy.distutils 中的“numpy.distutils._msvccompiler”; 嘗試從 distutils 自定義 MSVCCompiler 庫 mkl_rt 在 ['C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 'C:\\Users\\bundyjas\\AppData\\Local\\ Programs\\Python\\Python39\\libs'] 不可用
openblas_lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas not found in ['C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\libs']
get_default_fcompiler: matching types: '['gnu', 'intelv', 'absoft', 'compaqv', 'intelev', 'gnu95', 'g95', 'intelvem',
'intelem', 'flang']' 自定義 GnuFCompiler 找不到可執行文件 g77 找不到可執行文件 f77 自定義 IntelVisualFCompiler 找不到可執行文件 ifort 找不到可執行文件 ifl 自定義 AbsoftFCompiler 找不到可執行文件 f90 自定義 CompaqVisualFCompiler 找不到可執行文件 DFF 自定義 IntelItanium 可以找不到可執行文件 efl 自定義 Gnu95FCompiler 找不到可執行文件 gfortran 找不到可執行文件 f95 自定義 G95FCompiler 找不到可執行文件 g95 自定義 IntelEM64VisualFCompiler 自定義 IntelEM64TFCompiler 找不到可執行文件 efort 找不到可執行文件 efc 自定義 PGroupFlangCompiler 無法找到可執行文件在平台“nt”上編譯 Fortran 代碼不可用
openblas_clapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries openblas,lapack not found in ['C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\libs']
NOT AVAILABLE
flame_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries flame not found in ['C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\libs']
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries tatlas,tatlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
<class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
NOT AVAILABLE
atlas_3_10_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries satlas,satlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
<class 'numpy.distutils.system_info.atlas_3_10_info'>
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries ptf77blas,ptcblas,atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
<class 'numpy.distutils.system_info.atlas_threads_info'>
NOT AVAILABLE
atlas_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in C:\
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack_atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries f77blas,cblas,atlas not found in C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\libs
<class 'numpy.distutils.system_info.atlas_info'>
NOT AVAILABLE
accelerate_info:
NOT AVAILABLE
lapack_info:
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
libraries lapack not found in ['C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\lib', 'C:\\', 'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\libs']
NOT AVAILABLE
C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\numpy\distutils\system_info.py:1712: 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.
if getattr(self, '_calc_info_{}'.format(lapack))():
lapack_src_info:
NOT AVAILABLE
C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\numpy\distutils\system_info.py:1712: 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.
if getattr(self, '_calc_info_{}'.format(lapack))():
NOT AVAILABLE
Traceback (most recent call last):
File "C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\bundyjas\AppData\Local\Programs\Python\Python39\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\setuptools\build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 583, in <module>
setup_package()
File "setup.py", line 579, in setup_package
setup(**metadata)
File "C:\Users\bundyjas\AppData\Local\Temp\pip-build-env-eitrbrks\overlay\Lib\site-packages\numpy\distutils\core.py", line 137, in setup
config = configuration()
File "setup.py", line 477, in configuration
raise NotFoundError(msg)
numpy.distutils.system_info.NotFoundError: No lapack/blas resources found.
----------------------------------------
錯誤:命令出錯,退出狀態為 1:'C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\python.exe''C:\\Users\\bundyjas\\AppData\\Local\\Programs\\Python\\Python39\\ lib\\site-packages\\pip_vendor\\pep517_in_process.py' prepare_metadata_for_build_wheel 'C:\\Users\\bundyjas\\AppData\\Local\\Temp\\tmpmkxabgvf' 檢查日志以獲取完整的命令輸出。
從源代碼安裝 scipy非常苛刻,不推薦使用,尤其是在 Windows 上。 您的日志已經表明需要 C/C++/Fortran 編譯器,后者用於 OpenBLAS。 (在 1.0 之前,有很多年沒有正式的二進制版本!)
當沒有找到合適的預制二進制文件時,就會從源代碼安裝,就像你的情況一樣。
原因在這里:您使用的是 Python 3.9,它太新了(10 月 5 日:現在 < 2 周)。 目前還沒有官方的預制 scipy 版本。 暗示
使用 Python <= 3.8。 (相信我:您不想在 Windows 上從源代碼安裝)。
(這與 VS Code 完全無關/正交)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.