pycharm安装Numba失败问题

相关环境变量:

pycharm

Python 3.8

pip 19.3.1

Numba各个版本都不行

报错内容:

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple/
Collecting numba
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/33/6f/47d87ded23f3d1aa1e221d75278caf427e8da80649c14312172857bad64f/numba-0.46.0.tar.gz
Collecting llvmlite>=0.30.0dev0
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/8b/b0/df26861e6ce2fc91c8bb93ea808fa2e631ee8a29fc4c3bc96626b78dae74/llvmlite-0.30.0.tar.gz
Requirement already satisfied: numpy in d:\pycharm 2019.2.5\code\iris\venv\lib\site-packages (from numba) (1.17.4)
Installing collected packages: llvmlite, numba
Running setup.py install for llvmlite: started
Running setup.py install for llvmlite: finished with status 'error'

ERROR: Command errored out with exit status 1:
command: 'D:\PyCharm 2019.2.5\code\Iris\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\llvmlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\llvmlite\\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\Administrator\AppData\Local\Temp\pip-record-vhxy_h70\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\PyCharm 2019.2.5\code\Iris\venv\include\site\python3.8\llvmlite'
cwd: C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\
Complete output (27 lines):
running install
running build
got version from file C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\llvmlite/_version.py {'version': '0.30.0', 'full': '3cad106e2f727bc400f1b426ce306b1e30e34b72'}
running build_ext
D:\PyCharm 2019.2.5\code\Iris\venv\Scripts\python.exe C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py
Trying generator 'Visual Studio 14 2015 Win64'
Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py", line 168, in <module>
main()
File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py", line 156, in main
main_win32()
File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py", line 88, in main_win32
generator = find_win32_generator()
File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py", line 76, in find_win32_generator
try_cmake(cmake_dir, build_dir, generator)
File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\llvmlite\ffi\build.py", line 28, in try_cmake
subprocess.check_call(['cmake', '-G', generator, cmake_dir])
File "D:\Python\解释器\lib\subprocess.py", line 359, in check_call
retcode = call(*popenargs, **kwargs)
File "D:\Python\解释器\lib\subprocess.py", line 340, in call
with Popen(*popenargs, **kwargs) as p:
File "D:\Python\解释器\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "D:\Python\解释器\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] 系统找不到指定的文件。
error: command 'D:\\PyCharm 2019.2.5\\code\\Iris\\venv\\Scripts\\python.exe' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\PyCharm 2019.2.5\code\Iris\venv\Scripts\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\llvmlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\llvmlite\\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\Administrator\AppData\Local\Temp\pip-record-vhxy_h70\install-record.txt' --single-version-externally-managed --compile --install-headers 'D:\PyCharm 2019.2.5\code\Iris\venv\include\site\python3.8\llvmlite' Check the logs for full command output.

解决办法:

卸载Python 3.8 安装Python3.6.8

好使了 。。。

猜你喜欢

转载自www.cnblogs.com/jiangxue2019/p/11961724.html