Open SpelaBo opened 3 years ago
Here is the error message when I tried dev version, with pysal 2.0:
Couldn't load plugin 'HotSpotAnalysis_Plugin-qgis3pysal2' due to an error when calling its classFactory() method
ImportError: DLL load failed: The specified module could not be found. Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3pysal2__init.py", line 34, in classFactory from .hotspot_analysis import HotspotAnalysis File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotSpotAnalysis_Plugin-qgis3pysal2\hotspot_analysis.py", line 39, in import pysal File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\pysal__init.py", line 2, in from . import lib File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\pysal\lib__init__.py", line 27, in from . import cg File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\pysal\lib\cg__init__.py", line 4, in from .shapes import * File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\pysal\lib\cg\shapes.py", line 9, in from .sphere import arcdist File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\pysal\lib\cg\sphere.py", line 15, in import scipy.spatial File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\spatial\init__.py", line 102, in from ._procrustes import procrustes File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\spatial_procrustes.py", line 11, in from scipy.linalg import orthogonal_procrustes File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\init__.py", line 195, in from .misc import * File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\misc.py", line 5, in from .blas import get_blas_funcs File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\blas.py", line 215, in from scipy.linalg import _fblas File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: DLL load failed: The specified module could not be found.
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.10.9-A Coruña A Coruña, bf47e9d3e1
Python Path: C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins C:\PROGRA~1\QGIS3~1.10\apps\Python37 C:\PROGRA~1\QGIS3~1.10\apps\Python37\Scripts C:\Program Files\QGIS 3.10\bin\python37.zip C:\PROGRA~1\QGIS3~1.10\apps\Python37\DLLs C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib C:\Program Files\QGIS 3.10\bin C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32 C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32\lib C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\Pythonwin C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users\SpelaB\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms
Dear Špela,
you should try to understand which version of pysal QGIS uses by typing in the QGIS Python console eg
import pysal
print (pysal.__version__)
Then, I suggest to remove the current version and proceed with a clean installation of pysal.
Unfortunately, the dependency installation shows different issues depending on your local machine settings...
I can suggest I workaround that I found recently which is to install this plugin: https://plugins.qgis.org/plugins/visualist that embed a version of Pysal 2.0 (not sure that this will make the trick, so use it at last option). I am trying to replicate this patter also in my plugin to finally skip the extern pysal installation but still, it is a work in progress...
Sorry to not be able to help you further with that.
Best,
Daniele
Dear Daniele,
thank you for your answer. Apparently I have a problem with pysal. When I try your suggestion
import pysal
I get:
Traceback (most recent call last):
File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\code.py", line 90, in runcode
exec(code, self.locals)
File "", line 1, in
I completely removed Qgis, installed it again, no luck. I also can not install suggested visualist package. I know this is not an issue with your package, but if you have any idea what to do, I would be really grateful.
Thank you, Špela.
Dear Daniele,
I cannot load Hotspot Analysis plugin. I tried:
I commented line 95 #import pysal.spreg in file C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages\pysal__init__.py
However I still get an error:
Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() method
ImportError: DLL load failed: The specified module could not be found. Traceback (most recent call last): File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis__init.py", line 34, in classFactory from .hotspot_analysis import HotspotAnalysis File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in import pysal File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages\pysal__init.py", line 40, in import pysal.cg File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages\pysal\cg__init__.py", line 4, in from .shapes import * File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages\pysal\cg\shapes.py", line 12, in from .sphere import arcdist File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages\pysal\cg\sphere.py", line 16, in import scipy.spatial File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\spatial\init__.py", line 102, in from ._procrustes import procrustes File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\spatial_procrustes.py", line 11, in from scipy.linalg import orthogonal_procrustes File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\init__.py", line 195, in from .misc import * File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\misc.py", line 5, in from .blas import get_blas_funcs File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\scipy\linalg\blas.py", line 215, in from scipy.linalg import _fblas File "C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python\qgis\utils.py", line 743, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ImportError: DLL load failed: The specified module could not be found.
Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] QGIS version: 3.10.9-A Coruña A Coruña, bf47e9d3e1
Python Path: C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/PROGRA~1/QGIS3~1.10/apps/qgis-ltr/./python/plugins C:\PROGRA~1\QGIS3~1.10\apps\Python37 C:\PROGRA~1\QGIS3~1.10\apps\Python37\Scripts C:\Program Files\QGIS 3.10\bin\python37.zip C:\PROGRA~1\QGIS3~1.10\apps\Python37\DLLs C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib C:\Program Files\QGIS 3.10\bin C:\Users\SpelaB\AppData\Roaming\Python\Python37\site-packages C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32 C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\win32\lib C:\PROGRA~1\QGIS3~1.10\apps\Python37\lib\site-packages\Pythonwin C:/Users/SpelaB/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users\SpelaB\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\HCMGIS/forms
I also tried with pysal 2.0 and dev version of Hotspot Analysis, no luck. Is there anything more I can do?
Thank you! Špela Borko.