PUTvision / qgis-plugin-deepness

Deepness is a remote sensing plugin that enables deep learning inference in QGIS
https://www.buymeacoffee.com/deepness
Apache License 2.0
106 stars 25 forks source link

plugin installation problem #177

Closed Daulet4 closed 3 weeks ago

Daulet4 commented 4 months ago

I tried to install plugin manually and defaultly but it's not working. Always shows following error:

Attempting to install required packages... Making sure pip is installed... Pip is installed, skipping installation...

Attempting to install required packages...

Running command: $ python -m pip install -U --target=C:\Users\d.kairatov\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\deepness\python3.9opencv-python-headless>=4.5.5.64,=1.12.1, Collecting opencv-python-headless=4.5.5.64 Using cached opencv_python_headless-4.9.0.80-cp37-abi3-win_amd64.whl (38.5 MB) Collecting onnxruntime=1.12.1 Using cached onnxruntime-1.17.0-cp39-cp39-win_amd64.whl (5.6 MB) Collecting numpy>=1.17.0 Using cached numpy-2.0.0-cp39-cp39-win_amd64.whl (16.5 MB) Collecting packaging Using cached packaging-24.1-py3-none-any.whl (53 kB) Collecting coloredlogs Using cached coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB) Collecting protobuf Using cached protobuf-5.27.2-cp39-cp39-win_amd64.whl (426 kB) Collecting sympy Using cached sympy-1.13.0-py3-none-any.whl (6.2 MB) Collecting flatbuffers Using cached flatbuffers-24.3.25-py2.py3-none-any.whl (26 kB) Collecting humanfriendly>=9.1 Using cached humanfriendly-10.0-py2.py3-none-any.whl (86 kB) Collecting mpmath=1.1.0 Using cached mpmath-1.3.0-py3-none-any.whl (536 kB) Collecting pyreadline3 Using cached pyreadline3-3.4.1-py3-none-any.whl (95 kB) Installing collected packages: pyreadline3, mpmath, flatbuffers, sympy, protobuf, packaging, numpy, humanfriendly, opencv-python-headless, coloredlogs, onnxruntime ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. onnxruntime-gpu 1.18.1 requires numpy=1.21.6, but you have numpy 2.0.0 which is incompatible. scipy 1.6.2 requires numpy=1.16.5, but you have numpy 2.0.0 which is incompatible. Successfully installed coloredlogs-15.0.1 flatbuffers-24.3.25 humanfriendly-10.0 mpmath-1.3.0 numpy-2.0.0 onnxruntime-1.17.0 opencv-python-headless-4.9.0.80 packaging-24.1 protobuf-5.27.2 pyreadline3-3.4.1 sympy-1.13.0 [notice] A new release of pip available: 22.3 -> 24.1.2 [notice] To update, run: python.exe -m pip install --upgrade pip

Packages installed correctly!

Installation of required packages finished. Validating installation... Python packages required by the plugin could not be loaded due to the following error: Traceback (most recent call last): File "C:\Users/d.kairatov/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\dialogs\packages_installer\packages_installer_dialog.py", line 300, in _check_packages_installation_and_log import_packages() File "C:\Users/d.kairatov/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\dialogs\packages_installer\packages_installer_dialog.py", line 325, in import_packages import_package(package) File "C:\Users/d.kairatov/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\deepness\dialogs\packages_installer\packages_installer_dialog.py", line 320, in import_package importlib.import_module(package.import_name) File "C:\PROGRA~1\QGIS32~1.2\apps\Python39\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1030, in _gcd_import File "", line 1007, in _find_and_load File "", line 986, in _find_and_load_unlocked File "", line 680, in _load_unlocked File "", line 855, in exec_module File "", line 228, in _call_with_frames_removed File "C:\Users\d.kairatov\AppData\Roaming\Python\Python39\site-packages\onnxruntime\init.py", line 57, in raise import_capi_exception File "C:\Users\d.kairatov\AppData\Roaming\Python\Python39\site-packages\onnxruntime\init__.py", line 23, in from onnxruntime.capi._pybind_state import ExecutionMode # noqa: F401 File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\d.kairatov\AppData\Roaming\Python\Python39\site-packages\onnxruntime\capi_pybind_state.py", line 32, in from .onnxruntime_pybind11_state import * # noqa File "C:\PROGRA~1/QGIS32~1.2/apps/qgis/./python\qgis\utils.py", line 888, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: DLL load failed while importing onnxruntime_pybind11_state: The dynamic link library initialization program has failed (DLL).

Please try installing the packages again.

przemyslaw-aszkowski commented 4 months ago

Hi,

What QGIS and Windows versions are you using? It seems like you have a problem with onnxruntime Python package installation. Looks like it is a similar issue here: https://github.com/microsoft/onnxruntime/issues/16116 You can try to manually install a different version of onnxruntime package manually from the Python console in QGIS. I hope it helps

Przemek