- changed title to import numba crashes QGIS on linux
import numba crashes QGIS on linux
Calling import numba
causes a QGIS crash on miniconda QGIS.
Comments (21)
-
reporter -
reporter deactivated install/update options for numba + numpy and GDAL addresses
#405addresses#403addresses#405addresses#390→ <<cset 104aa32676f1>>
-
reporter deactivated install/update options for numba + numpy and GDAL addresses
#405addresses#403addresses#405addresses#390→ <<cset 104aa32676f1>>
-
It also crashes on my win7 system, which installed following
After running
python3 -m pip install -r https://bitbucket.org/hu-geomatics/enmap-box/raw/develop/requirements.txt
it is reported that requirement numba is already satisfied
I actually cannot run Enmabox now…
-
reporter - changed status to open
-
reporter @Augustin Lobo do you get any other error message?
Numba makes me crazy. Seems that there is no save way to install it bundled in the requirements.txt
-
This is whay I get in the qgis python error log window:
2020-04-21T08:26:23 WARNING Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\core\typeconv\typeconv.py", line 4, in
from numba.core.typeconv import _typeconv
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: DLL load failed: No se puede encontrar el módulo especificado.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 47, in classFactory
raise ex
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 43, in classFactory
plugin = EnMAPBoxPlugin(iface)
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 49, in __init__
self.initialDependencyCheck()
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 64, in initialDependencyCheck
missing = [p for p in requiredPackages() if not p.isInstalled()]
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 391, in requiredPackages
pkg = PIPPackage(pyPkg, cmd)
File "C:/Users/1/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 99, in __init__
__import__(self.pyPkgName)
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\__init__.py", line 20, in
from numba.misc.special import (
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\misc\special.py", line 3, in
from numba.core.typing.typeof import typeof
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\core\typing\__init__.py", line 1, in
from .context import BaseContext, Context
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\core\typing\context.py", line 11, in
from numba.core.typeconv import Conversion, rules
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\core\typeconv\rules.py", line 2, in
from .typeconv import TypeManager, TypeCastingRules
File "C:/PROGRA~1/QGIS3~1.12/apps/qgis/./python\qgis\utils.py", line 744, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\PROGRA~1\QGIS3~1.12\apps\Python37\lib\site-packages\numba\core\typeconv\typeconv.py", line 17, in
raise ImportError(msg % (url, reportme, str(e), sys.executable))
ImportError: Numba could not be imported.
If you are seeing this message and are undertaking Numba development work, you may need to re-run:
python setup.py build_ext --inplace
(Also, please check the development set up guide http://numba.pydata.org/numba-doc/latest/developer/contributing.html.)
If you are not working on Numba development:
Please report the error message and traceback, along with a minimal reproducer
at: https://github.com/numba/numba/issues/new
If more help is needed please feel free to speak to the Numba core developers
directly at: https://gitter.im/numba/numba
Thanks in advance for your help in improving Numba!
The original error was: 'DLL load failed: No se puede encontrar el módulo especificado.'
-------------------------------------------------------------------------------
If possible please include the following in your error report:
sys.executable: C:\Program Files\QGIS 3.12\bin\qgis-bin.exe
-
I get the same error if I run (from the OSGeo4W Shell terminal) the
adviced testing (https://numba.pydata.org/numba-doc/dev/user/installing.html#checking-your-installation):
python3 -m numba -s
so the problem seems to be that the installation is not correct.
Reported https://github.com/numba/numba/issues?q=is%3Aissue+is%3Aopen+importerror
-
I can verify this, pip installation in osgeoshell works without any error messages. Once
import numba
is called (or try to start enmapbox) the following message pops up– numba version 0.49.0
Couldn't load plugin 'enmapboxplugin' due to an error when calling its classFactory() method ImportError: Numba could not be imported. If you are seeing this message and are undertaking Numba development work, you may need to re-run: python setup.py build_ext --inplace (Also, please check the development set up guide http://numba.pydata.org/numba-doc/latest/developer/contributing.html.) If you are not working on Numba development: Please report the error message and traceback, along with a minimal reproducer at: https://github.com/numba/numba/issues/new If more help is needed please feel free to speak to the Numba core developers directly at: https://gitter.im/numba/numba Thanks in advance for your help in improving Numba! The original error was: 'DLL load failed: Das angegebene Modul wurde nicht gefunden.' -------------------------------------------------------------------------------- If possible please include the following in your error report: sys.executable: C:\OSGeo4W64\bin\qgis-bin.exe Traceback (most recent call last): File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\core\typeconv\typeconv.py", line 4, in from numba.core.typeconv import _typeconv File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: DLL load failed: Das angegebene Modul wurde nicht gefunden. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 47, in classFactory raise ex File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 43, in classFactory plugin = EnMAPBoxPlugin(iface) File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 49, in __init__ self.initialDependencyCheck() File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 64, in initialDependencyCheck missing = [p for p in requiredPackages() if not p.isInstalled()] File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 391, in requiredPackages pkg = PIPPackage(pyPkg, cmd) File "C:/Users/thielf54/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 99, in __init__ __import__(self.pyPkgName) File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\__init__.py", line 20, in from numba.misc.special import ( File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\misc\special.py", line 3, in from numba.core.typing.typeof import typeof File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\core\typing\__init__.py", line 1, in from .context import BaseContext, Context File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\core\typing\context.py", line 11, in from numba.core.typeconv import Conversion, rules File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\core\typeconv\rules.py", line 2, in from .typeconv import TypeManager, TypeCastingRules File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\OSGEO4~1\apps\Python37\lib\site-packages\numba\core\typeconv\typeconv.py", line 17, in raise ImportError(msg % (url, reportme, str(e), sys.executable)) ImportError: Numba could not be imported. If you are seeing this message and are undertaking Numba development work, you may need to re-run: python setup.py build_ext --inplace (Also, please check the development set up guide http://numba.pydata.org/numba-doc/latest/developer/contributing.html.) If you are not working on Numba development: Please report the error message and traceback, along with a minimal reproducer at: https://github.com/numba/numba/issues/new If more help is needed please feel free to speak to the Numba core developers directly at: https://gitter.im/numba/numba Thanks in advance for your help in improving Numba! The original error was: 'DLL load failed: Das angegebene Modul wurde nicht gefunden.' -------------------------------------------------------------------------------- If possible please include the following in your error report: sys.executable: C:\OSGeo4W64\bin\qgis-bin.exe Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.12.2-București București, 8a1fb33634
-
Workaround: Going back to numba version 0.47.0 worked for me. @Agustin Lobo maybe try this.
(Installing version 0.48.0 did not work for me, hence 0.47.0, see error below)
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Zugriff verweigert: 'c:\\osgeo4~1\\apps\\python37\\lib\\site-packages\\~umpy\\.libs\\libopenblas.PYQHXLVVQ7VESDPUVUADXEVJOBGHJPAY.gfortran-win_amd64.dll' Consider using the `--user` option or check the permissions.
-
@Fabian Thiel worked! thanks. This is what I did:
python3 -m pip uninstall numba
python3 -m pip install numba==0.47.0
and then enmapbox 3.6 worked fine upon starting qgis
-
-
reporter requirements.txt reduced numba version to <=0.47, addresses
#405→ <<cset 62709bd914cf>>
-
Note the last comment in https://github.com/numba/numba/issues/5600 seems to indicate that “installing the latest Visual Studio Redistributable from Microsoft resolves the issue”
I’ve not done it myself as I’m not a regular windows user and fear of eventual negative consequences of such an update. I’m happy with just keeping numba 0.47 by now.
-
reporter I modified the initial dependency check.
It now handles any python Exception, i.e. theImportError
descrbied above, not justModuleNotFound
errors. -
reporter Issue
#464was marked as a duplicate of this issue. -
I can’t install Enmap correctly even I install the numba 0.47.0. I have no idea what next I can do. who can help me ?
The numba was instelled successfully.
>>> import numba >>> numba.__version__ '0.47.0'
Python error: Couldn't load plugin 'enmapboxplugin' due to an error when calling its classFactory() method See message log (Python Error) for more details.
Couldn't load plugin 'enmapboxplugin' due to an error when calling its classFactory() method
TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'
Traceback (most recent call last): File "D:/Program Files/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 47, in classFactory raise ex File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 43, in classFactory plugin = EnMAPBoxPlugin(iface) File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 49, in __init__ self.initialDependencyCheck() File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 64, in initialDependencyCheck missing = [p for p in requiredPackages() if not p.isInstalled()] File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 391, in requiredPackages pkg = PIPPackage(pyPkg, cmd) File "C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 99, in __init__ __import__(self.pyPkgName) File "D:/Program Files/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\__init__.py", line 45, in import numba.typed File "D:/Program Files/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\typed\__init__.py", line 3, in from .typeddict import Dict File "D:/Program Files/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\typed\typeddict.py", line 18, in @njit File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 224, in njit return jit(*args, **kws) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 161, in jit return wrapper(pyfunc) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 177, in wrapper **dispatcher_args) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\dispatcher.py", line 576, in __init__ self.targetctx = self.targetdescr.target_context File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\registry.py", line 50, in target_context return self._toplevel_target_context File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\utils.py", line 381, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\registry.py", line 34, in _toplevel_target_context return cpu.CPUContext(self.typing_context) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\base.py", line 250, in __init__ self.init() File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock return func(*args, **kwargs) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\cpu.py", line 49, in init self._internal_codegen = codegen.JITCPUCodegen("numba.exec") File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\codegen.py", line 612, in __init__ self._init(self._llvm_module) File "D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\codegen.py", line 621, in _init tm = target.create_target_machine(**tm_options) TypeError: create_target_machine() got an unexpected keyword argument 'jitdebug'
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
QGIS version: 3.12.3-București București, 8234261527Python Path:
- D:/Program Files/QGIS 3.12/apps/qgis/./python
- C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python
- C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
- D:/Program Files/QGIS 3.12/apps/qgis/./python/plugins
- D:\Program Files\QGIS 3.12\apps\Python37
- D:\Program Files\QGIS 3.12\apps\Python37\Scripts
- D:\Program Files\QGIS 3.12\bin\python37.zip
- D:\Program Files\QGIS 3.12\apps\Python37\DLLs
- D:\Program Files\QGIS 3.12\apps\Python37\lib
- D:\Program Files\QGIS 3.12\bin
- C:\Users\zgh\AppData\Roaming\Python\Python37\site-packages
- D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages
- D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\win32
- D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\win32\lib
- D:\Program Files\QGIS 3.12\apps\Python37\lib\site-packages\Pythonwin
- C:/Users/zgh/AppData/Roaming/QGIS/QGIS3\profiles\default/python
- C:\Users\zgh\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages
- C:\Users\zgh\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\externals\qps\externals
- C:\Users\zgh\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox
- C:\Users\zgh\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages
-
reporter Can you show me the error message that appears when you start the EnMAP-Box?
-
reporter @guanhui in my system (Windows 10, OSGeo4W with QGIS 3.14.16-2) numba seems to work, if installed with pip.
-
reporter dependencycheck.py removed numba from INSTALLATION_BLOCK addresses
#538addresses#405addresses#385Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 33225e21bc05>>
-
- changed status to closed
I'll close this for now. Reopen if still relevant.
- Log in to comment