尝试 pip numba JIT 编译器时出错

Error while trying to pip numba JIT compiler

我在尝试使用 pip 安装 numba JIT 编译器时收到了一条很长的错误消息。我不知道它应该告诉我什么。我唯一能看出的是这可能是一个叫做 llvmlite 的问题。我查看了网站,它说我不需要安装 LLVM 编译器库,因为 JIT 编译器无论如何都会忽略该程序的任何预装版本。

https://numba.pydata.org/numba-doc/dev/user/installing.html

我是 运行 最近的 python 安装(我最近从 anaconda 切换过来),版本是 3.8。会不会是python3.8还比较新导致的bug?

回溯:

Collecting numba
  Downloading https://files.pythonhosted.org/packages/33/6f/47d87ded23f3d1aa1e221d75278caf427e8da80649c14312172857bad64f/numba-0.46.0.tar.gz (1.9MB)
     |████████████████████████████████| 1.9MB 3.3MB/s
Collecting llvmlite>=0.30.0dev0
  Downloading https://files.pythonhosted.org/packages/8b/b0/df26861e6ce2fc91c8bb93ea808fa2e631ee8a29fc4c3bc96626b78dae74/llvmlite-0.30.0.tar.gz (110kB)
     |████████████████████████████████| 112kB ...
Requirement already satisfied: numpy in c:\python\python38\lib\site-packages (from numba) (1.17.4)
Installing collected packages: llvmlite, numba
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\setup.py'"'"'; __file__='"'"'C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\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\chris\AppData\Local\Temp\pip-record-ywcimgks\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\
    Complete output (27 lines):
    running install
    running build
    got version from file C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\llvmlite/_version.py {'version': '0.30.0', 'full': '3cad106e2f727bc400f1b426ce306b1e30e34b72'}
    running build_ext
    c:\python\python38\python.exe C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py
    Trying generator 'Visual Studio 14 2015 Win64'
    Traceback (most recent call last):
      File "C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py", line 168, in <module>
        main()
      File "C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py", line 156, in main
        main_win32()
      File "C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py", line 88, in main_win32
        generator = find_win32_generator()
      File "C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py", line 76, in find_win32_generator
        try_cmake(cmake_dir, build_dir, generator)
      File "C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\ffi\build.py", line 28, in try_cmake
        subprocess.check_call(['cmake', '-G', generator, cmake_dir])
      File "c:\python\python38\lib\subprocess.py", line 359, in check_call
        retcode = call(*popenargs, **kwargs)
      File "c:\python\python38\lib\subprocess.py", line 340, in call
        with Popen(*popenargs, **kwargs) as p:
      File "c:\python\python38\lib\subprocess.py", line 854, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "c:\python\python38\lib\subprocess.py", line 1307, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] Das System kann die angegebene Datei nicht finden
    error: command 'c:\python\python38\python.exe' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python\python38\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\llvmlite\setup.py'"'"'; __file__='"'"'C:\Users\chris\AppData\Local\Temp\pip-install-2p6lwjaw\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\chris\AppData\Local\Temp\pip-record-ywcimgks\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

没关系:https://twitter.com/numba_jit/status/1189933337391095808

看来如果他们在 10 月份没有骗我,我现在随时都会安装我的 numba 0.47。