gustavowillam / SmartMapPlugin

Plugin Qgis3.10.x para interpolação utilizando Krigagem Ordinária (OK), Machine Learning (ML) e Geração de Zonas de Manejo
https://github.com/gustavowillam/SmartMapPlugin
GNU General Public License v3.0
52 stars 13 forks source link

Python error on starting Qgis3.36 #69

Closed ThomasStruller closed 5 months ago

ThomasStruller commented 6 months ago

On starting Qgis 3.36 on win 11 I get following error:

2024-03-22T09:43:41 CRITICAL Traceback (most recent call last): File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\utils\install_deps.py", line 262, in import sklearn File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 923, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ModuleNotFoundError: No module named 'sklearn'

         During handling of the above exception, another exception occurred:

         Traceback (most recent call last):
          File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 426, in _startPlugin
          plugins[packageName] = package.classFactory(iface)
          File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\__init__.py", line 36, in classFactory
          from .Smart_Map import smart_map
          File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\Smart_Map.py", line 88, in 
          from .utils import install_deps #Install deps on QGIS: sklearn, skfuzzy, pysal
          File "C:\OSGeo4W/apps/qgis/./python\qgis\utils.py", line 923, in _import
          mod = _builtin_import(name, globals, locals, fromlist, level)
          File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\utils\install_deps.py", line 295, in 
          load_external_package(qgis_python_version, 'sklearn', dep, exec_number, unzip=True)
          File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\utils\install_deps.py", line 164, in load_external_package
          unzip_external_package(qgis_python_version, library_name, path_to_zip_file, directory_to_extract_to)
          File "C:\Users/thomas.struller/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\Smart_Map\utils\install_deps.py", line 133, in unzip_external_package
          zip_ref.extractall(directory_to_extract_to)
          File "C:\OSGeo4W\apps\Python39\lib\zipfile.py", line 1642, in extractall
          self._extract_member(zipinfo, path, pwd)
          File "C:\OSGeo4W\apps\Python39\lib\zipfile.py", line 1696, in _extract_member
          open(targetpath, "wb") as target:
         PermissionError: [Errno 13] Permission denied: 'C:\\Users\\thomas.struller\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\site-packages\\sklearn\\.libs\\vcomp140.dll'
gustavowillam commented 6 months ago

Use version 3.34 of QGIS. It is a more stable version (LTR).

The error appears to be permission access to the folder: PermissionError: [Errno 13] Permission denied: 'C:\Users\thomas.struller\AppData\Roaming\QGIS\QGIS3\profiles\default\python\site-packages\sklearn\ .libs\vcomp140.dll'

The operating system does not allow the plugin to access this folder.

Go to this folder and change the access properties to: Full access (Reading and Writing).