简体   繁体   中英

How to solve error while installing numba?

so I have a problem while I have try to install numba to python by using the pip command in CMD (pip install numba ), and I always get the following output and error:

Collecting numba
  Using cached numba-0.51.2.tar.gz (2.1 MB)
Requirement already satisfied: numpy>=1.15 in c:\users\se_320_gb\appdata\local\programs\python\python39\lib\site-packages (from numba) (1.19.4)
Requirement already satisfied: setuptools in c:\users\se_320_gb\appdata\local\programs\python\python39\lib\site-packages (from numba) (49.2.1)
Collecting llvmlite<0.35,>=0.34.0.dev0
  Using cached llvmlite-0.34.0.tar.gz (107 kB)
Using legacy 'setup.py install' for numba, since package 'wheel' is not installed.
Using legacy 'setup.py install' for llvmlite, since package 'wheel' is not installed.
Installing collected packages: llvmlite, numba
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\se_320_gb\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Se_320_Gb\\AppData\\Local\\Temp\\pip-install-_v76h2mu\\llvmlite_0c956b9ff442433e8d48ac4e37563a11\\setup.py'"'"'; __file__='"'"'C:\\Users\\Se_320_Gb\\AppData\\Local\\Temp\\pip-install-_v76h2mu\\llvmlite_0c956b9ff442433e8d48ac4e37563a11\\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\Se_320_Gb\AppData\Local\Temp\pip-record-phjgzn90\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\se_320_gb\appdata\local\programs\python\python39\Include\llvmlite'
         cwd: C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\
    Complete output (27 lines):
    running install
    running build
    got version from file C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\llvmlite/_version.py {'version': '0.34.0', 'full': 'c5889c9e98c6b19d5d85ebdd982d64a03931f8e2'}
    running build_ext
    c:\users\se_320_gb\appdata\local\programs\python\python39\python.exe C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py
    Trying generator 'Visual Studio 15 2017 Win64'
    Traceback (most recent call last):
      File "C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py", line 191, in <module>
        main()
      File "C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py", line 179, in main
        main_win32()
      File "C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py", line 88, in main_win32
        generator = find_win32_generator()
      File "C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py", line 76, in find_win32_generator
        try_cmake(cmake_dir, build_dir, generator)
      File "C:\Users\Se_320_Gb\AppData\Local\Temp\pip-install-_v76h2mu\llvmlite_0c956b9ff442433e8d48ac4e37563a11\ffi\build.py", line 28, in try_cmake
        subprocess.check_call(['cmake', '-G', generator, cmake_dir])
      File "c:\users\se_320_gb\appdata\local\programs\python\python39\lib\subprocess.py", line 368, in check_call
        retcode = call(*popenargs, **kwargs)
      File "c:\users\se_320_gb\appdata\local\programs\python\python39\lib\subprocess.py", line 349, in call
        with Popen(*popenargs, **kwargs) as p:
      File "c:\users\se_320_gb\appdata\local\programs\python\python39\lib\subprocess.py", line 947, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "c:\users\se_320_gb\appdata\local\programs\python\python39\lib\subprocess.py", line 1416, in _execute_child
        hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
    FileNotFoundError: [WinError 2] The system cannot find the file specified
    error: command 'c:\\users\\se_320_gb\\appdata\\local\\programs\\python\\python39\\python.exe' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\se_320_gb\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Se_320_Gb\\AppData\\Local\\Temp\\pip-install-_v76h2mu\\llvmlite_0c956b9ff442433e8d48ac4e37563a11\\setup.py'"'"'; __file__='"'"'C:\\Users\\Se_320_Gb\\AppData\\Local\\Temp\\pip-install-_v76h2mu\\llvmlite_0c956b9ff442433e8d48ac4e37563a11\\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\Se_320_Gb\AppData\Local\Temp\pip-record-phjgzn90\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\se_320_gb\appdata\local\programs\python\python39\Include\llvmlite' Check the logs for full command output.


I have tried to uninstall then reinstall PyCharm and python but these does not work I think that the probleme have some thing with the environment variables
I am using a python version 3.9.1 with PyCharm version 2020.3.1,if any additional information needed ask me pls

It looks like from your error that llvmlite was not installed correctly.

Looking at this Github issue , you're not the only person with this problem.

I think you might have to switch to an earlier version of Python.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM