我正在嘗試安裝 NumPy 但遇到問題。我使用的python版本是3.9,Windows版本是10,錯誤如下:C:\>pip3 install numpyCollecting numpyUsing cached numpy-1.19.2.zip (7.3 MB)Installing build dependencies ... doneGetting requirements to build wheel ... donePreparing wheel metadata ... errorERROR: Command errored out with exit status 1: command: 'c:\users\arr48\appdata\local\programs\python\python39\python.exe' 'c:\users\arr48\appdata\local\programs\python\python39\lib\site-packages\pip\_vendor\pep517\_in_process.py' prepare_metadata_for_build_wheel 'C:\Users\arr48\AppData\Local\Temp\tmp0g3__7ax' cwd: C:\Users\arr48\AppData\Local\Temp\pip-install-fincp1mj\numpyComplete output (200 lines):Running from numpy source directory.setup.py:470: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates run_build = parse_setuppy_commands()Processing numpy/random\_bounded_integers.pxd.inProcessing numpy/random\bit_generator.pyxProcessing numpy/random\mtrand.pyxProcessing numpy/random\_bounded_integers.pyx.inProcessing numpy/random\_common.pyxProcessing numpy/random\_generator.pyxProcessing numpy/random\_mt19937.pyxProcessing numpy/random\_pcg64.pyxProcessing numpy/random\_philox.pyxProcessing numpy/random\_sfc64.pyxCythonizing sourcesblas_opt_info:blas_mkl_info:No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutilscustomize MSVCCompiler libraries mkl_rt not found in ['c:\\users\\arr48\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\arr48\\appdata\\local\\programs\\python\\python39\\libs'] NOT AVAILABLEblis_info: libraries blis not found in ['c:\\users\\arr48\\appdata\\local\\programs\\python\\python39\\lib', 'C:\\', 'c:\\users\\arr48\\appdata\\local\\programs\\python\\python39\\libs'] NOT AVAILABLE
2 回答

拉風的咖菲貓
TA貢獻1995條經(jīng)驗 獲得超2個贊
該numpy
軟件包尚不包含 Python 3.9 的二進制文件,因此pip
嘗試從源代碼進行編譯。正如錯誤消息所示,這(當然)要求您擁有適當?shù)?C 編譯器。這并不簡單。pip
想要 Visual C++ 14.2。Microsoft 提供的唯一版本是 Visual C++ 2019,又名版本 16,它不能與pip
.?
pip
使用如下方式安裝輪子:
pip?install?D:\Users\<user>\Downloads\numpy-1.19.2+mkl-cp39-cp39-win_amd64.whl

泛舟湖上清波郎朗
TA貢獻1818條經(jīng)驗 獲得超3個贊
最后幾行說:
“錯誤:需要 Microsoft Visual C++ 14.0。通過“Build Tools for Visual Studio”獲取它: https: //visualstudio.microsoft.com/downloads/”
你有 msvc 14 嗎?
添加回答
舉報
0/150
提交
取消