[英]importing jit from numba raise an error
So I'm trying to import jit
from the numba
library but the import produces an OSError and says that a specific module couldn't be found.所以我试图从
numba
库中导入jit
但导入产生了一个 OSError 并说找不到特定的模块。 I tried to uninstall and reinstall numba, but it didn't change anything and I have no other idea to solve the issue.我试图卸载并重新安装 numba,但它没有改变任何东西,我也没有其他想法可以解决这个问题。
Here is the full error:这是完整的错误:
Traceback (most recent call last):
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\llvmlite\binding\ffi.py", line 42, in <module>
lib = ctypes.CDLL(os.path.join(_lib_dir, _lib_name))
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\ctypes\__init__.py", line 350, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Le module spécifié est introuvable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:/Users/user65/HypotheseDecoupageReseau/CalculInfluence.py", line 6, in <module>
from numba import jit
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numba\__init__.py", line 11, in <module>
from . import config, errors, runtests, types
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\numba\config.py", line 11, in <module>
import llvmlite.binding as ll
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\llvmlite\binding\__init__.py", line 6, in <module>
from .dylib import *
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\llvmlite\binding\dylib.py", line 4, in <module>
from . import ffi
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\site-packages\llvmlite\binding\ffi.py", line 47, in <module>
lib = ctypes.CDLL(_lib_name)
File "D:\Users\user65\Logiciels\WinPython-64bit-3.4.4.6Qt5\python-3.4.4.amd64\lib\ctypes\__init__.py", line 350, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] Le module spécifié est introuvable
Process finished with exit code 1
Thank you for your help :)感谢您的帮助 :)
As said in this page you are not alone.正如本页所说,您并不孤单。 This is the problem of the version
3.4.4
这是
3.4.4
版本的问题
You have some options:你有一些选择:
Try upgrading and see that the problem solves.尝试升级并查看问题是否解决。
Aside from that people saying It's due to script\\python.bat
and python.exe
interfering.除了人们说这是由于
script\\python.bat
和python.exe
干扰。
python.bat
is currently calling ptpython
when it sees it, which has not the same syntax. python.bat
当前正在调用ptpython
时,它没有相同的语法。
You may try pip uninstall ptpython
and see if it helps.您可以尝试
pip uninstall ptpython
看看它是否有帮助。
You may also copy the current python.bat
as winpython.bat
, and keep python.bat
calling only python:您也可以将当前的
python.bat
复制为winpython.bat
,并保持python.bat
只调用 python:
@echo off call "%~dp0env_for_icons.bat" cd/D "%WINPYWORKDIR%" rem backward compatibility for python.exe "%WINPYDIR%\python.exe" %*
llvmlite
error part should be solved by now.llvmlite
错误部分。 You should have Visual Studio 2015
installed for other error parts to go away.Visual Studio 2015
以消除其他错误部分。vc_redist.x86.exe
alone from this link and dont install the whole VS2015.vc_redist.x86.exe
而不要安装整个 VS2015。 Follow here for more information.Check if you are using a compatible version of Python.检查您是否使用兼容版本的 Python。
In my case I had to remove Python and downgrade to a previous version就我而言,我必须删除 Python 并降级到以前的版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.