Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impossível carregar complemento 'Smart_Map' Devido a um erro ao chamar o método Class Factory(). #64

Closed
araujomatheu opened this issue Feb 12, 2024 · 7 comments

Comments

@araujomatheu
Copy link

Boa tarde. Estou com dificuldades para usar o plugin smart-map.

Aparece a seguinte mensagem: Impossível carregar complemento 'Smart_Map' Devido a um erro ao chamar o método Class Factory().

smartmap

Como resolver o problema?

@sarviovalente
Copy link

sarviovalente commented Feb 14, 2024 via email

@araujomatheu
Copy link
Author

Olá, professor.
Estou usando o Windows 11 home language e QGIS 3.28.
A mensagem começou a aparecer na tela inicial do QGIS, conforme a imagem abaixo, após excluir a pasta Smart-map que é criada depois de gerar um mapa interpolado.
Captura de tela 2024-02-15 074513

E aparece também após tentar habilitar o plugin quando clico em "Complementos --> Gerenciar e instalar complementos" e seleciono o Smart-Map.

Já tentei desinstalar e instalar novamente o Qgis mas mesmo assim continuo com esse problema.

@sarviovalente
Copy link

sarviovalente commented Feb 15, 2024 via email

@araujomatheu
Copy link
Author

Fiz todo o procedimento descrito no vídeo, mas o problema continua.

smartmap

Impossível carregar complemento 'Smart_Map' Devido a um erro ao chamar o método Class Factory().

ImportError: No module named 'sklearn.__check_build._check_build' ___________________________________________________________________________ Contents of C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_check_build: setup.py check_build.cp37-win_amd64.pyd__init.py pycache ___________________________________________________________________________ It seems that scikit-learn has not been built correctly. If you have installed scikit-learn from source, please do not forget to build the package before using it: run python setup.py install or make in the source directory. If you have used an installer, please check that it is suited for your Python version, your operating system and your platform.
Traceback (most recent call last):
File "C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_check_build_init.py", line 44, in
from ._check_build import check_build # noqa
File "C:\PROGRA~1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'sklearn.__check_build._check_build'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\PROGRA1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 423, in startPlugin
plugins[packageName] = package.classFactory(iface)
File "C:\Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map_init
.py", line 36, in classFactory
from .Smart_Map import smart_map
File "C:\PROGRA
1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 94, in
from .utils import functions #Utility functions -> file functions.py
File "C:\PROGRA1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\utils\functions.py", line 26, in
from sklearn import svm
File "C:\PROGRA
1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_init
.py", line 81, in
from . import __check_build # noqa: F401
File "C:\PROGRA~1/QGIS 3.28.15/apps/qgis-ltr/./python\qgis\utils.py", line 888, in _import
mod = _builtin_import(name, globals, locals, fromlist, level)
File "C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_check_build_init.py", line 46, in
raise_build_error(e)
File "C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_check_build_init.py", line 31, in raise_build_error
raise ImportError("""%s
ImportError: No module named 'sklearn.__check_build._check_build'


Contents of C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn_check_build:
setup.py check_build.cp37-win_amd64.pyd__init
.py
pycache


It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run python setup.py install or
make in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.

Versão do Python: 3.9.18 (heads/master:c290dc6, Jan 14 2024, 01:36:02) [MSC v.1929 64 bit (AMD64)]
Versão do QGIS: 3.28.15-Firenze Firenze, 252ad49ddc

Caminho do Python:
C:/PROGRA1/QGIS 3.28.15/apps/qgis-ltr/./python
C:/Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/PROGRA
1/QGIS 3.28.15/apps/qgis-ltr/./python/plugins
C:\PROGRA1\QGIS 3.28.15\apps\grass\grass83\etc\python
C:\Users\55659\Documents
C:\Program Files\QGIS 3.28.15\bin\python39.zip
C:\PROGRA
1\QGIS 3.28.15\apps\Python39\DLLs
C:\PROGRA1\QGIS 3.28.15\apps\Python39\lib
C:\Program Files\QGIS 3.28.15\bin
C:\PROGRA
1\QGIS 3.28.15\apps\Python39
C:\PROGRA1\QGIS 3.28.15\apps\Python39\lib\site-packages
C:\PROGRA
1\QGIS 3.28.15\apps\Python39\lib\site-packages\win32
C:\PROGRA1\QGIS 3.28.15\apps\Python39\lib\site-packages\win32\lib
C:\PROGRA
1\QGIS 3.28.15\apps\Python39\lib\site-packages\Pythonwin
C:/Users/55659/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages
C:\Users\55659\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages

@araujomatheu
Copy link
Author

Boa tarde, professor.

O smartmap ainda não está funcionando, poderia ajudar novamente?

@gustavowillam
Copy link
Owner

gustavowillam commented Mar 27, 2024

Uma nova versão do Smart-Map está disponível no repositório do QGIS. Instale a nova versão (1.4) juntamente com a ultima versão estável do QGIS (3.34 LTR).

Antes de instalar o QGIS, faça a remoção completa da versão instalada através do Painel de Controles -> Programas e Recursos -> Desistalar

Após desinstalado o QGIS remova as seguintes pastas:

  1. Delete a pasta "site-packages" que se encontra dentro da pasta: C:\Users<nome do usuario da maquina>\AppData\Roaming\QGIS\QGIS3\profiles\default\python

  2. Delete a pasta "Python3xx" que se encontra dentor da pasta: C:\Users<nome do usuario da maquina>\AppData\Roaming\Python

Após remover estas pastas instale o QGIS 3.34 e o plugin Smart-Map.

@araujomatheu
Copy link
Author

Bom dia,

Obrigado, pessoal. Vou a funcionar.

Att,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants