Ariel505 / aChor

Task oriented data classification for choropleth maps
2 stars 3 forks source link

No module named 'pysal.esda' #8

Open pcav opened 4 years ago

pcav commented 4 years ago

Upon install I get an error. Pysal is of course installed (2.0.0-1).

Impossibile caricare il plugin 'aChor' a causa di un errore chiamando il metodo classFactory() 

ModuleNotFoundError: No module named 'pysal.esda' 
Traceback (most recent call last):
  File "/usr/local/src/QGIS/build-qgis-3_10/output/python/qgis/utils.py", line 334, in _startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/aChor/__init__.py", line 35, in classFactory
    from .aChor import aChor
  File "/usr/local/src/QGIS/build-qgis-3_10/output/python/qgis/utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/aChor/aChor.py", line 49, in 
    from pysal.esda.getisord import *
  File "/usr/local/src/QGIS/build-qgis-3_10/output/python/qgis/utils.py", line 744, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pysal.esda'

Versione Python: 3.7.5 (default, Oct 27 2019, 15:43:29) [GCC 9.2.1 20191022] 
Versione di QGIS: 3.10.0-A Coruña A Coruña, 413de47e3b 

Percorso Python:
/usr/local/src/QGIS/build-qgis-3_10/output/python
/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python
/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python/plugins
/usr/local/src/QGIS/build-qgis-3_10/output/python/plugins
/usr/lib/python37.zip
/usr/lib/python3.7
/usr/lib/python3.7/lib-dynload
/usr/local/lib/python3.7/dist-packages
/usr/lib/python3/dist-packages
/usr/lib/python3.7/dist-packages
/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python
/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python/plugins/qgis2web
/home/paolo/.local/share/QGIS/QGIS3/profiles/default/python/plugins
Ariel505 commented 4 years ago

Hello pcav, You may need to downgrade pysal to 1.14.x Have a look at this post: https://github.com/danioxoli/HotSpotAnalysis_Plugin/issues/23 Let me know if this works for you.

At the mean time, I will try to upgrade the plugin to adapt pysal 2.0 when I have time. Cheers, Ariel

pcav commented 4 years ago

Please add this note to the About, so people will know before installing. Downgrading is not always an easy option. Thanks.

Ariel505 commented 4 years ago

added as suggested in Github and Gitlab

pcav commented 4 years ago

I do not see this as a definitive solution. I'd suggest to leave the ticket open for reference.

KumawatP commented 4 years ago

I am also having the same error as:-

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

ModuleNotFoundError: No module named 'pysal.esda' Traceback (most recent call last): File "/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotSpotAnalysis_Plugin-qgis3/init.py", line 34, in classFactory from .hotspot_analysis import HotspotAnalysis File "/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HotSpotAnalysis_Plugin-qgis3/hotspot_analysis.py", line 39, in from pysal.esda.getisord import * File "/Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 744, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'pysal.esda'

Python version: 3.7.3 (default, Mar 27 2019, 09:23:15) [Clang 10.0.1 (clang-1001.0.46.3)] QGIS version: 3.12.1-București București, 121cc00ff0

Python Path: /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AequilibraE/aequilibrae /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/AequilibraE/aequilibrae /Applications/QGIS3.12.app/Contents/MacOS/../Resources/python /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins /Applications/QGIS3.12.app/Contents/MacOS/../Resources/python/plugins /Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python37.zip /Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/lib-dynload /Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages/geos /Applications/QGIS3.12.app/Contents/Resources/python /Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7 /Applications/QGIS3.12.app/Contents/Frameworks/Python.framework/Versions/Current/lib/python3.7/site-packages /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HCMGIS/forms /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/mmqgis/forms . /Users/pinky/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/HCMGIS/forms

Please help me to solve this problem on mac.

Ariel505 commented 4 years ago

Please downgrade pysal to 1.14.x

alotfata commented 3 years ago

when I write in terminal pip show pysal it show 1.14.3

But i have same error, i cant plugin hotspot

Ariel505 commented 3 years ago

Hello @alotfata @KumawatP Are you using windows? If so, please install with whl file which fit to your python version you can find them here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#pysal in osgeo4w shell py3_env pip install PySAL-1.14.4.post2-py3-none-any.whl

Then test it with import pysal

when I write in terminal pip show pysal it show 1.14.3

But i have same error, i cant plugin hotspot