UMEP-dev / UMEP

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

Unable to install UMEP at QGIS #389

Closed paula-lelis closed 2 years ago

paula-lelis commented 2 years ago

Hello, I am trying to install UMEP as a plugin for QGIS and there is an error related to Phyton. Could you please help me to solve this issue? Thanks!

Um erro ocorreu enquanto executava o código Python:

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe Traceback (most recent call last): File "C:\Users/Paula Rabelo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\UMEP\suewsmodel__init.py", line 9, in import supy as sp File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages\supy__init__.py", line 17, in from ._supy_module import ( File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages\supy_supy_module.py", line 28, in from ._check import check_forcing, check_state File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages\supy_check.py", line 11, in from ._load import dict_var_type_forcing File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages\supy_load.py", line 8, in from supy_driver import suews_driver as sd File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages\supy_driver\init__.py", line 13, in from supy_driver.suews_driver import ( File "C:\PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: numpy.core.multiarray failed to import

During handling of the above exception, another exception occurred:

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe

Versão do Python: 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit (AMD64)] Versão do QGIS: 3.22.4-Białowieża Białowieża, ce8e65e9

Caminho do Python: C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python C:/Users/Paula Rabelo/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/Paula Rabelo/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS32~1.4/apps/qgis-ltr/./python/plugins C:\Program Files\QGIS 3.22.4\bin\python39.zip C:\PROGRA~1\QGIS32~1.4\apps\Python39\DLLs C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib C:\Program Files\QGIS 3.22.4\bin C:\Users\Paula Rabelo\AppData\Roaming\Python\Python39\site-packages C:\PROGRA~1\QGIS32~1.4\apps\Python39 C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\GDAL-3.4.1-py3.9-win-amd64.egg C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32 C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\win32\lib C:\PROGRA~1\QGIS32~1.4\apps\Python39\lib\site-packages\Pythonwin C:/Users/Paula Rabelo/AppData/Roaming/QGIS/QGIS3\profiles\default/python

paula-lelis commented 2 years ago

the main problem seems to do with numpy but I don't know how to fix it... anybody knows?

biglimp commented 2 years ago

I suspect you have an old version of numpy. Take a look at the Getting started section on the UMEP manual to find out how you can update.

paula-lelis commented 2 years ago

Dear biglimp, As a matter of fact my numpy is up to date, since I ran pip install numpy --upgrade and when I freeze my Python it shows me the numpy 1.22.3 version.... On another hand, when I run the OsGeo4W setup it shows me that the installed version is 1.20.2-1... does that mean that I have two numpy installed?

paula-lelis commented 2 years ago

well it seems that it wasn't that... I uninstalled from the setup the numpy version and reinstalled it and upgraded through the shell.... but the same error message appears: RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe I am completelly stuck! help please :)

paula-lelis commented 2 years ago

When I restart QGIS a box pops up with this message: Currently, we have a numpy version conflict that might produce a Python error after installation of UMEP. This will be resolved if you restart your QGIS session. But it does not resolve it.... :(

paula-lelis commented 2 years ago

I managed to solve it! I had, indeed, two numpys installed... had to uninstall from the shell. Thks!

CsillaVG commented 2 years ago

Thank you for the tip @paula-lelis I had the same issue under Mac OS X: updating numpy to the latest version did the trick.