Closed geofausto closed 3 years ago
Olá Fausto!
No diretório: /home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/site-packages/sklearn/ Edit o arquivo: _distributor_init.py, removendo as linhas compreendidas no intervalo de 10 a 18. Depois abra o QGIS. O plugin deverá estar disponível para utilização.
Olá Gustavo, Tentei apagar as linhas conforme indicação. Porém, ao habilitar ou reinstalar o ele volta a editar este arquivo inlcuindo as linhas apagadas. Segue o erro:
ImportError: cannot import name 'WinDLL' from 'ctypes' (/usr/lib/python3.8/ctypes/init.py) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/qgis/utils.py", line 334, in _startPlugin plugins[packageName] = package.classFactory(iface) File "/home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/init.py", line 36, in classFactory from .Smart_Map import smart_map File "/usr/lib/python3/dist-packages/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/Smart_Map.py", line 80, in from .utils import install_deps #Install deps on QGIS: pandas, sklearn, skfuzzy, pysal File "/usr/lib/python3/dist-packages/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/plugins/Smart_Map/utils/install_deps.py", line 131, in import sklearn File "/usr/lib/python3/dist-packages/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/site-packages/sklearn/init.py", line 80, in from . import _distributor_init # noqa: F401 File "/usr/lib/python3/dist-packages/qgis/utils.py", line 792, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "/home/fausto/.local/share/QGIS/QGIS3/profiles/default/python/site-packages/sklearn/_distributor_init.py", line 12, in from ctypes import WinDLL ImportError: cannot import name 'WinDLL' from 'ctypes' (/usr/lib/python3.8/ctypes/init.py)
Olá Fausto, Disponibilizei uma nova versão no repositório do QGIS. Essa nova versão corrige o erro mencionado. Remova o plugin do seu QGIS e realize a instalação da nova verão disponível no repositório.
Olá Gustavo, Instalado! Precisei instalar sklearn via pip. Parabéns pelo desenvolvimento deste plugin. Obrigado.
Olá,
Estou com este erro após instalar (via Gerenciador de Plugins) e sempre que abro o QGIS:
Aba Phython Error:
Fiz a instalção das dependências via
python -m pip install scikit-learn
Linux Mint 20.1 Cinnamon Python version: 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] QGIS version: 3.16.3-Hannover Hannover, 94ac9f21b8