我正在尝试安装 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条经验 获得超2个赞
该numpy
软件包尚不包含 Python 3.9 的二进制文件,因此pip
尝试从源代码进行编译。正如错误消息所示,这(当然)要求您拥有适当的 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条经验 获得超3个赞
最后几行说:
“错误:需要 Microsoft Visual C++ 14.0。通过“Build Tools for Visual Studio”获取它: https: //visualstudio.microsoft.com/downloads/”
你有 msvc 14 吗?
添加回答
举报
0/150
提交
取消