我为尝试安装numba时发生的错误而生气。我尝试使用
安装pip install numba==0.47.0
我得到了大量我不了解的错误。在此之前,问题是有关安装Microsoft Viual C ++ 14.0的,我做到了,现在我希望问题消除了。
我已经在官方网站上安装了带有.exe文件的python3.8。这是错误:
C:\Users\brini>pip install numba==0.47.0
Collecting numba==0.47.0
Using cached numba-0.47.0.tar.gz (1.9 MB)
Requirement already satisfied: llvmlite>=0.31.0dev0 in c:\users\brini\appdata\local\programs\python\python38-32\lib\site-packages (from numba==0.47.0) (0.31.0)
Requirement already satisfied: numpy in c:\users\brini\appdata\local\programs\python\python38-32\lib\site-packages (from numba==0.47.0) (1.18.1)
Requirement already satisfied: setuptools in c:\users\brini\appdata\local\programs\python\python38-32\lib\site-packages (from numba==0.47.0) (45.1.0)
Installing collected packages: numba
Running setup.py install for numba ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\brini\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\brini\\AppData\\Local\\Temp\\pip-install-nemtt4cb\\numba\\setup.py'"'"'; __file__='"'"'C:\\Users\\brini\\AppData\\Local\\Temp\\pip-install-nemtt4cb\\numba\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\brini\AppData\Local\Temp\pip-record-zh3iiwqf\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\brini\appdata\local\programs\python\python38-32\Include\numba'
cwd: C:\Users\brini\AppData\Local\Temp\pip-install-nemtt4cb\numba\
Complete output (719 lines):
TBB not found
Using OpenMP from: True
running install
running build
got version from file C:\Users\brini\AppData\Local\Temp\pip-install-nemtt4cb\numba\numba/_version.py {'version': '0.47.0', 'full': '4eb9cf875969ef7f099b292e0c5a8bb852f6fc7f'}
running build_py
creating build
许多带有copying numba\...
的行。最后
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'numba._dynfunc' extension
creating build\temp.win32-3.8
creating build\temp.win32-3.8\Release
creating build\temp.win32-3.8\Release\numba
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\brini\appdata\local\programs\python\python38-32\include -Ic:\users\brini\appdata\local\programs\python\python38-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcnumba/_dynfuncmod.c /Fobuild\temp.win32-3.8\Release\numba/_dynfuncmod.obj -g
cl : Command line warning D9002 : ignoring unknown option '-g'
_dynfuncmod.c
c:\users\brini\appdata\local\programs\python\python38-32\include\pyconfig.h(206): fatal error C1083: Cannot open include file: 'basetsd.h': No such file or directory
error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:\users\brini\appdata\local\programs\python\python38-32\include -Ic:\users\brini\appdata\local\programs\python\python38-32\include -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /Tcnumba/_dynfuncmod.c /Fobuild\temp.win32-3.8\Release\numba/_dynfuncmod.obj -g" failed with exit status 2
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\brini\appdata\local\programs\python\python38-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\brini\\AppData\\Local\\Temp\\pip-install-nemtt4cb\\numba\\setup.py'"'"'; __file__='"'"'C:\\Users\\brini\\AppData\\Local\\Temp\\pip-install-nemtt4cb\\numba\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\brini\AppData\Local\Temp\pip-record-zh3iiwqf\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\brini\appdata\local\programs\python\python38-32\Include\numba' Check the logs for full command output.