UMEP-dev / UMEP

Urban Multi-scale Environmental Predictor
https://umep-docs.readthedocs.io/
59 stars 15 forks source link

Error with QGIS 3.32 and numpy 1.23.3 #549

Closed sanvibol closed 2 months ago

sanvibol commented 10 months ago

I get an error message when I launch QGIS. I follow the instructions to install numpy version 1.23.3 but I still see an error. OS: macOS 11.7.9 QGIS Version: 3.32.2-Lima UMEP Version: 4.0.2 UMEP for processing Version 2.0.7

Here is an error message:

Couldn't load plugin 'processing_umep' due to an error when calling its classFactory() method

SystemExit: 'jaydebeapi' Python package is missing Traceback (most recent call last): File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/H2gisConnection.py", line 23, in import jaydebeapi File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'jaydebeapi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/init.py", line 38, in classFactory from .processing_umep import ProcessingUMEPPlugin File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep.py", line 38, in from .processing_umep_provider import ProcessingUMEPProvider File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep_provider.py", line 54, in from .processor.urock_processing_algorithm import URockAlgorithm File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processor/urock_processing_algorithm.py", line 63, in from ..functions.URock import MainCalculation File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/MainCalculation.py", line 11, in from . import H2gisConnection File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/H2gisConnection.py", line 27, in exit("'jaydebeapi' Python package is missing") File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/_sitebuiltins.py", line 26, in call raise SystemExit(code) SystemExit: 'jaydebeapi' Python package is missing

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] QGIS version: 3.32.2-Lima Lima, c0b88339649

Python Path: /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/UMEP/SUEWSPrepare/Modules /Applications/QGIS.app/Contents/MacOS/../Resources/python /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg /Users/mac/.local/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9 /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python39.zip /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python

j3r3m1 commented 10 months ago

Have you tried restarting QGIS ? It might solve the problem (the library jaydebeapi should have been installed - cf. the issue which might be solved soon: https://github.com/UMEP-dev/UMEP-processing/issues/38)

j3r3m1 commented 10 months ago

Have you tried restarting QGIS ? It might solve the problem (the library jaydebeapi should have been installed - cf. the issue which might be solved soon: https://github.com/UMEP-dev/UMEP-processing/issues/38)

sanvibol commented 10 months ago

I tried to restart QGIS several times but it is the same error.

matt03corrigan commented 10 months ago

I am also having this same issue, same error message everytime

j3r3m1 commented 10 months ago

Have you tried installing the library via the following command ? pip install jaydebeapi

sanvibol commented 10 months ago

I have already install jaydebeapi via pip but the error message still appears:

Couldn't load plugin 'processing_umep' due to an error when calling its classFactory() method

SystemExit: 'jaydebeapi' Python package is missing Traceback (most recent call last): File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/H2gisConnection.py", line 23, in import jaydebeapi File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'jaydebeapi'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/init.py", line 38, in classFactory from .processing_umep import ProcessingUMEPPlugin File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep.py", line 38, in from .processing_umep_provider import ProcessingUMEPProvider File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processing_umep_provider.py", line 54, in from .processor.urock_processing_algorithm import URockAlgorithm File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/processor/urock_processing_algorithm.py", line 63, in from ..functions.URock import MainCalculation File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/MainCalculation.py", line 11, in from . import H2gisConnection File "/Applications/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/processing_umep/functions/URock/H2gisConnection.py", line 27, in exit("'jaydebeapi' Python package is missing") File "/Applications/QGIS.app/Contents/MacOS/lib/python3.9/_sitebuiltins.py", line 26, in call raise SystemExit(code) SystemExit: 'jaydebeapi' Python package is missing

Python version: 3.9.5 (default, Sep 10 2021, 16:18:19) [Clang 12.0.5 (clang-1205.0.22.11)] QGIS version: 3.32.2-Lima Lima, c0b88339649

Python Path: /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/UMEP/SUEWSPrepare/Modules /Applications/QGIS.app/Contents/MacOS/../Resources/python /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Rtree-0.9.7-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/numba-0.50.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/lib-dynload /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pyproj-3.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/cftime-1.2.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/scipy-1.5.1-py3.9-macosx-10.13.0-x86_64.egg /Users/mac/.local/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/geopandas-0.8.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9 /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/netCDF4-1.5.4-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/patsy-0.5.1-py3.9.egg /Applications/QGIS.app/Contents/MacOS/lib/python39.zip /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/statsmodels-0.11.1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/GDAL-3.3.2-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/matplotlib-3.3.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/rasterio-1.1.5-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Pillow-7.2.0-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/pandas-1.3.3-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/Fiona-1.8.13.post1-py3.9-macosx-10.13.0-x86_64.egg /Applications/QGIS.app/Contents/MacOS/lib/python3.9/site-packages/opencv_contrib_python-4.3.0.36-py3.9-macosx-10.13.0-x86_64.egg /Users/mac/Library/Application Support/QGIS/QGIS3/profiles/default/python

sanvibol commented 10 months ago

Here is the message during jaydebeapi installation:

(base) mac@MACs-MacBook-Pro ~ % pip install jaydebeapi Requirement already satisfied: jaydebeapi in /opt/anaconda3/lib/python3.9/site-packages (1.2.3) Requirement already satisfied: JPype1 in /opt/anaconda3/lib/python3.9/site-packages (from jaydebeapi) (1.4.1) Requirement already satisfied: packaging in /opt/anaconda3/lib/python3.9/site-packages (from JPype1->jaydebeapi) (21.0) Requirement already satisfied: pyparsing>=2.0.2 in /opt/anaconda3/lib/python3.9/site-packages (from packaging->JPype1->jaydebeapi) (3.0.4)

j3r3m1 commented 10 months ago

It semss you are using an anaconda environment. jaydebeapi is thus not installed at the right location. Can you try installing outside your conda environement ? Otherwise install qgis in this anaconda environment but also all needed packages.

matt03corrigan commented 10 months ago

Is particularly easy to do ? Can't say I'm too good at attempting to use python or coding in general. Just need to access the software for my university dissertation.

The two errors I'm getting are the Jaydebeapi package missing for "UMEP processing" and also an error with the python code: RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe

Any help would be much appreciated to potentially get to the bottom of this.

Thanks

On Thu, Sep 14, 2023 at 10:19 AM jeremy-b @.***> wrote:

It semss you are using an anaconda environment. jaydebeapi is thus not installed at the right location. Can you try installing outside your conda environement ? Otherwise install qgis in this anaconda environment but also all needed packages.

— Reply to this email directly, view it on GitHub https://github.com/UMEP-dev/UMEP/issues/549#issuecomment-1719076043, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCRVTI242GLBSH4NJSO5UXDX2LDZDANCNFSM6AAAAAA4S3UNHE . You are receiving this because you commented.Message ID: @.***>

j3r3m1 commented 10 months ago

You can have a try with the following command line in a shell: conda deactivate --> This should deactivate your conda environment

and then install jaydebeapi in the default python path using pip as you did before: pip install jaydebeapi

matt03corrigan commented 10 months ago

Attempted to deactivate conda but turns out I don't actually have it installed so not sure why it hasn't registered my installation of "Jaydebeapi"

On Mon, Sep 18, 2023 at 2:06 PM jeremy-b @.***> wrote:

You can have a try with the following command line in a shell: conda deactivate --> This should deactivate your conda environment

and then install jaydebeapi in the default python path using pip as you did before: pip install jaydebeapi

— Reply to this email directly, view it on GitHub https://github.com/UMEP-dev/UMEP/issues/549#issuecomment-1723369527, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCRVTI3MTESK266UYYSSSCDX3BBLVANCNFSM6AAAAAA4S3UNHE . You are receiving this because you commented.Message ID: @.***>

j3r3m1 commented 10 months ago

Sorry but it is sometimes complicated to deal with two cases in a same issue. Have you tried the command pip install jaydebeapi

matt03corrigan commented 10 months ago

Thats alright,

Yes I've run that command and believe Jaydebeapi is installed on my computer, running it again gives the message "request is already satisfied" however still receiving the same error in QGIS

On Mon, Sep 18, 2023 at 9:07 PM jeremy-b @.***> wrote:

Sorry but it is sometimes complicated to deal with two cases in a same issue. Have you tried the command pip install jaydebeapi

— Reply to this email directly, view it on GitHub https://github.com/UMEP-dev/UMEP/issues/549#issuecomment-1724293076, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCRVTI6RHBBM2JSJ5UR2MVLX3CSWZANCNFSM6AAAAAA4S3UNHE . You are receiving this because you commented.Message ID: @.***>

j3r3m1 commented 10 months ago

what OS do you use ? Do you use OSGEO4W ?

matt03corrigan commented 10 months ago

Im using MacOS, not entirely sure about OSGEO4W but from what I've read online I presume that I don't use that as I have a mac

On Tue, Sep 19, 2023 at 11:00 AM jeremy-b @.***> wrote:

what OS do you use ? Do you use OSGEO4W ?

— Reply to this email directly, view it on GitHub https://github.com/UMEP-dev/UMEP/issues/549#issuecomment-1725195960, or unsubscribe https://github.com/notifications/unsubscribe-auth/BCRVTI4DNVHRMBLXDDHRKZLX3FULTANCNFSM6AAAAAA4S3UNHE . You are receiving this because you commented.Message ID: @.***>

dawgermany commented 8 months ago

Thats alright, Yes I've run that command and believe Jaydebeapi is installed on my computer, running it again gives the message "request is already satisfied" however still receiving the same error in QGIS

are you aware that you have to use the pip which is shipped with qgis for all dependencies inside qgis? See: https://github.com/UMEP-dev/UMEP/discussions/409

dawgermany commented 8 months ago

Is particularly easy to do ? Can't say I'm too good at attempting to use python or coding in general. Just need to access the software for my university dissertation. The two errors I'm getting are the Jaydebeapi package missing for "UMEP processing" and also an error with the python code: RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe Any help would be much appreciated to potentially get to the bottom of this. Thanks

see https://github.com/UMEP-dev/UMEP-processing/issues/30

dawgermany commented 8 months ago

Also I would at this state advise against using conda QGIS if you do not specifically need that, speaking from experience as i had trouble with it in the past. Just use the one from QGIS. There will rather sooner than later be a native Apple Silicon build (see https://github.com/qgis/QGIS-Enhancement-Proposals/issues/270 and https://github.com/opengisch/qgis-conda-builder)

j3r3m1 commented 6 months ago

@sanvibol and @matt03corrigan do you still have trouble installing UMEP or did it work with the newest version of the plugin ?

Otherwise it might be useful to try installing using anaconda as described in this issue / discussion: #584

j3r3m1 commented 2 months ago

I consider it is solved. Feel free to reopen if needed