EnMAP QGIS pluggin error
Hi All
I have installed the EnMAP box plugging as at https://bitbucket.org/hu-geomatics/enmap-box/downloads/enmapboxplugin.3.2.20180910T2032.feature_lester_fixes.zip.
I have followed the download instructions as laid out in the following document https://media.readthedocs.org/pdf/enmap-box/latest/enmap-box.pdf. including installing all the packages required.
When I install the pluggin i get the following error:
Couldn't load plugin 'enmapboxplugin' due to an error when calling its classFactory() method
Exception: Unable to import the following python package(s): sklearn
Please install missing packages using the local package manager like pip3 and root access. More information available under: http://enmap-box.readthedocs.io/en/latest/Installation.html Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.2/apps/qgis/./python\qgis\utils.py", line 337, in startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin__init__.py", line 23, in classFactory raise ex File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin__init__.py", line 19, in classFactory plugin = EnMAPBoxPlugin(iface) File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 42, in init self.initialDependencyCheck() File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\enmapbox\enmapboxplugin.py", line 108, in initialDependencyCheck raise Exception(longText) Exception: Unable to import the following python package(s):
sklearn
I have however installed the scikit-learn package and even gone as far as installing another package called sklearn version 0.0. I am using windows.
can someone please assist me in getting the EnMAP box working in QGIS, I would be very much appreciative of any help.
kind regards
Comments (12)
-
-
scikit-learn is a critical dependency. You might try to re-install it using the
--force-reinstall
:`pip install scikit-learn --force-reinstall`
astropy is not required to run the EnMAP-Box, you don't need to install it. Its installation can become very complicated on windows, as a different of none-python dependencies need to exist. However, some more options will become available if astropy is installed, but most of the EnMAP-Box works without it.
-
@thielfab it think we should label astropy as optional but not strictly required package
-
Now mentioned as optional in dependency list (not in code windows)
-
@thielfab this should work as OSGeo4W shell one-line installer to install alll dependencies (except astropy)
python -m pip install -r https://bitbucket.org/hu-geomatics/enmap-box/raw/develop/requirements.txt #or python -m pip install -r <path_to_unzipped_enmapboxpluginfolder>/requirements.txt
We need to check if
--force-reinstall
is required or not. -
@jakimowb the one-line installer worked well, many thanks.
-
reporter My resolution was moving the zip folder to "C:\Users\user\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins" and updating all the dependencies required. I then had no issue with the installation
-
- changed status to open
@thielfab can we re-organize the installation doc to show the plugin installation + pip one-line call in a shorter way, particulary without all theses OSGeo4W installer screenshots?
-
I can change that, but maybe we might want to discuss that in the bigger round again. The detail of the windows installation was demanded e.g. by Sebastian and Akpona, which is why there are quite a lot of screenshots. But if you say, that we don't need the OSGeo4W way to install it anymore, because pip + requirements.txt does the job, then it makes perfect sense to remove it again, yes. Maybe we move it then to the Troubleshooting section, as "alternative installation" or similar....
-
just add something like a "in a nutshell" section before the existing once. Like
- Add developer repo to QGIS plugin repository list
- Install EnMAP-Box
- Missing packages? Close QGIS, start shell with admin rights and install via
python -m pip install ... requirements.txt
Because installing astropy drives user crazy, please note everywhere that astropy is not required but will add additionally functionality
-
Regarding astropy, maybe it is a version problem (3.0.4 is the recent one).
python3 -m pip install astropy
did not work. What worked though:
python3 -m pip install astropy==3.0.3 --force-reinstall
Also: I tested installation on a clean QGIS with requirements.txt, worked fine!
-
- changed status to resolved
- Log in to comment
Yes having the same problems with sklearn and also astropy gives the following message following package download:
Command "C:\PROGRA~1\QGIS3~1.2\bin\python3.exe -u -c "import setuptools, tokenize;file='C:\Users\_\AppData\Local\Temp\pip-install-rvvycrq1\astropy\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_\AppData\Local\Temp\pip-record-wue5o7hh\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users_\AppData\Local\Temp\pip-install-rvvycrq1\astropy\