Not detecting python packages
Hi,
After upgrading my installation of EnMap-Box, the program is no longer recognizing locally-installed python packages. I am running v3.6 with QGIS 3.12 on Windows 10 64-bit.
Please see attached images for illustration.
When I try to install the necessary packages in OSGeo4W, I get the message that a new version of pip is available and I should "consider upgrading." But I am unable to update pip using pip because it just results in a loop.
This may partly be an issue with OSGeo, but I know the python packages are there and EnMap-Box just isn't finding them. I used the program for months without ever encountering this issue prior to the plugin update.
Full OSGeo command-prompt text is pasted below.
Thanks,
Luke
run o-help for a list of available commands C:>call py3_env.bat
C:>SET PYTHONHOME=C:\PROGRA~1\QGIS 3.12\apps\Python37
C:>SET PYTHONPATH=C:\PROGRA~1\QGIS 3.12\apps\Python37;C:\PROGRA~1\QGIS 3.12\apps\Python37\Scripts
C:>PATH C:\PROGRA~1\QGIS 3.12\apps\Python37;C:\PROGRA~1\QGIS 3.12\apps\Python37\Scripts;C:\PROGRA~1\QGIS 3.12\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\WBem
C:>python3 -m pip install -r https://bitbucket.org/hu-geomatics/enmap-box/raw/develop/requirements.txt ERROR: Exception: Traceback (most recent call last): File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\cli\base_command.py", line 186, in _main status = self.run(options, args) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\commands\install.py", line 258, in run isolated_mode=options.isolated_mode, File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\commands\install.py", line 604, in decide_user_install if site_packages_writable(root=root_path, isolated=isolated_mode): File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\commands\install.py", line 549, in site_packages_writable test_writable_dir(d) for d in set(get_lib_location_guesses(kwargs)) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\commands\install.py", line 549, in <genexpr> test_writable_dir(d) for d in set(get_lib_location_guesses(kwargs)) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\utils\filesystem.py", line 140, in test_writable_dir return _test_writable_dir_win(path) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\pip_internal\utils\filesystem.py", line 153, in _test_writable_dir_win fd = os.open(file, os.O_RDWR | os.O_CREAT | os.O_EXCL) PermissionError: [Errno 13] Permission denied: 'C:\PROGRA~1\QGIS 3.12\apps\Python37\Lib\site-packages\accesstest_deleteme_fishfingers_custard_2fwevo' WARNING: You are using pip version 20.0.2; however, version 20.1.1 is available. You should consider upgrading via the 'C:\PROGRA~1\QGIS 3.12\bin\python3.exe -m pip install --upgrade pip' command.
C:>
Comments (8)
-
-
- changed status to open
-
Hi Benjamin,
Running as admin fixed the pip issue and I installed/updated all of the packages, but the original problem of EnMAp Box not being able to detect them persists.
-
How does the error message look like now? and can you import these packages in your QGIS python window?
-
Now I get an error upon startup (image attached, text copied below).
Importing packages directly in the python console does not seem to work.
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 "C:/PROGRA~1/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 47, in classFactory raise ex File "C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\__init__.py", line 43, in classFactory plugin = EnMAPBoxPlugin(iface) File "C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 49, in __init__ self.initialDependencyCheck() File "C:/Users/Luke/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/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 391, in requiredPackages pkg = PIPPackage(pyPkg, cmd) File "C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\dependencycheck.py", line 99, in __init__ __import__(self.pyPkgName) File "C:/PROGRA~1/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\__init__.py", line 196, in import numba.typed File "C:/PROGRA~1/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\typed\__init__.py", line 3, in from .typeddict import Dict File "C:/PROGRA~1/QGIS 3.12/apps/qgis/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\typed\typeddict.py", line 19, in @njit File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 238, in njit return jit(*args, **kws) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 175, in jit return wrapper(pyfunc) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\decorators.py", line 191, in wrapper **dispatcher_args) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\dispatcher.py", line 650, in __init__ self.targetctx = self.targetdescr.target_context File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\registry.py", line 50, in target_context return self._toplevel_target_context File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\utils.py", line 390, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "C:\PROGRA~1\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 "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\base.py", line 260, in __init__ self.init() File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\compiler_lock.py", line 32, in _acquire_compile_lock return func(*args, **kwargs) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\cpu.py", line 51, in init self._internal_codegen = codegen.JITCPUCodegen("numba.exec") File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\codegen.py", line 628, in __init__ self._init(self._llvm_module) File "C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\numba\targets\codegen.py", line 637, 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:
- C:/PROGRA~1/QGIS 3.12/apps/qgis/./python
- C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python
- C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
- C:/PROGRA~1/QGIS 3.12/apps/qgis/./python/plugins
- C:\PROGRA~1\QGIS 3.12\apps\Python37
- C:\PROGRA~1\QGIS 3.12\apps\Python37\Scripts
- C:\Program Files\QGIS 3.12\bin\python37.zip
- C:\PROGRA~1\QGIS 3.12\apps\Python37\DLLs
- C:\PROGRA~1\QGIS 3.12\apps\Python37\lib
- C:\Program Files\QGIS 3.12\bin
- C:\Users\Luke\AppData\Roaming\Python\Python37\site-packages
- C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages
- C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\win32
- C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\win32\lib
- C:\PROGRA~1\QGIS 3.12\apps\Python37\lib\site-packages\Pythonwin
- C:/Users/Luke/AppData/Roaming/QGIS/QGIS3\profiles\default/python
- C:\Users\Luke\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\ee_plugin\extlibs_windows
- C:\Users\Luke\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages
- C:\Users\Luke\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox\externals\qps\externals
- C:\Users\Luke\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapbox
- C:\Users\Luke\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\site-packages
-
-
Hey @Luke Auld-Thomas, does this problem still exists?
-
- changed status to closed
I'll close this for now. Reopen if required.
- Log in to comment
Hi Luke,
looks like you haven’t started the OSGeo4W shell with admin right (``PermissionError: [Errno 13] Permission denied``) and pip is just missing writing access.