danioxoli / HotSpotAnalysis_Plugin

A QGIS plugin for hotspot analysis
GNU General Public License v3.0
56 stars 13 forks source link

ImportError: DLL load failed: The specified module could not be found. #58

Open KDDS89 opened 4 years ago

KDDS89 commented 4 years ago

Hello - I have looked through the most recent issues and tried all of the solutions. Clean installs, v3.10 QGIS, spreg comment, pysal v2 version and no matter what I do I get some sort of "Couldn't load plugin 'HotspotAnalysis' due to an error when calling its classFactory() " error.

Below is what i get currently with my setup - any help would be much appreciated.

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.14/apps/qgis/./python\qgis\utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/user/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.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\HotspotAnalysis\hotspot_analysis.py", line 38, in 
    import pysal
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\pysal\__init__.py", line 40, in 
    import pysal.cg
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\pysal\cg\__init__.py", line 4, in 
    from .shapes import *
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\pysal\cg\shapes.py", line 12, in 
    from .sphere import arcdist
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\pysal\cg\sphere.py", line 16, in 
    import scipy.spatial
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\scipy\spatial\__init__.py", line 102, in 
    from ._procrustes import procrustes
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\scipy\spatial\_procrustes.py", line 11, in 
    from scipy.linalg import orthogonal_procrustes
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\scipy\linalg\__init__.py", line 195, in 
    from .misc import *
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\scipy\linalg\misc.py", line 5, in 
    from .blas import get_blas_funcs
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python\qgis\utils.py", line 743, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\scipy\linalg\blas.py", line 215, in 
    from scipy.linalg import _fblas
  File "C:/PROGRA~1/QGIS3~1.14/apps/qgis/./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.14.15-Pi Pi, d5114d2cfa 

Python Path:
C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python
C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA~1/QGIS3~1.14/apps/qgis/./python/plugins
C:\PROGRA~1\QGIS3~1.14\apps\Python37
C:\PROGRA~1\QGIS3~1.14\apps\Python37\Scripts
C:\Program Files\QGIS 3.14\bin\python37.zip
C:\PROGRA~1\QGIS3~1.14\apps\Python37\DLLs
C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib
C:\Program Files\QGIS 3.14\bin
C:\Users\user\AppData\Roaming\Python\Python37\site-packages
C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages
C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32
C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\win32\lib
C:\PROGRA~1\QGIS3~1.14\apps\Python37\lib\site-packages\Pythonwin
C:/Users/user/AppData/Roaming/QGIS/QGIS3\profiles\default/python
danioxoli commented 4 years ago

This looks like an error in the pysal dependencies. To which pysal version your QGIS is pointing now? The fixing operations you mentioned are simply workarounds that prove to work in some case but they bring risks... Is your system using pysal for other applications and some dependency path is no more reachable?

In any case, this is something connected to your local system setting and it is impossible to fix from remote. I suggest trying again with a clean QGIS installation being sure that all the other versions are uninstalled.

Daniele