3

I installed QGIS and I am having this message when I start qgis

Python error: Couldn't load plugin 'rastertool' due to an error when calling its classFactory() method See message log (Python Error) for more details."

Because of it I think I cannot make many processes when I use raster tools. I have tried to fix it but I cannot.

Do you know how I can fix it??

I use QGIS for windows and I use QGIS 3.4.14 version "Medeira"

Below is the whole error.

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

ModuleNotFoundError: No module named 'pandas' 
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 335, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rastertool\__init__.py", line 35, in classFactory
    from .RasterTool import RasterTool
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\rastertool\RasterTool.py", line 51, in 
    from pandas import read_csv
  File "C:/OSGEO4~1/apps/qgis-ltr/./python\qgis\utils.py", line 685, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
ModuleNotFoundError: No module named 'pandas'


Python version: 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] 
QGIS version: 3.4.14-Madeira Madeira, c92881c294 

Python Path:
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\leastcostpath
C:/OSGEO4~1/apps/qgis-ltr/./python
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins
C:/OSGEO4~1/apps/qgis-ltr/./python/plugins
C:\OSGEO4~1\apps\gdal2\pymod3\scripts
C:\OSGEO4~1\apps\gdal2\pymod3\lib\site-packages
C:\OSGEO4~1\apps\Python37
C:\OSGEO4~1\apps\Python37\Scripts
C:\OSGeo4W64\bin\python37.zip
C:\OSGEO4~1\apps\Python37\DLLs
C:\OSGEO4~1\apps\Python37\lib
C:\OSGeo4W64\bin
C:\OSGEO4~1\apps\Python37\lib\site-packages
C:\OSGEO4~1\apps\Python37\lib\site-packages\win32
C:\OSGEO4~1\apps\Python37\lib\site-packages\win32\lib
C:\OSGEO4~1\apps\Python37\lib\site-packages\Pythonwin
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\aderyn
C:/Users/lambr/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\aderyn
4
  • Welcome to StackExchange. Maybe you could try the latest release version of QGIS (which is 3.10.1)? You can find it here. If you have the same problem with this version too, you can find information here on how to report a QGIS bug.
    – Johan
    Commented Jan 8, 2020 at 14:18
  • Johan, they're using the latest version of the LTS branch. Commented Jan 8, 2020 at 14:26
  • Thanks for your answer. At the beginning I downloaded the latest version but I had the same issue.
    – Lampros
    Commented Jan 8, 2020 at 14:42
  • I edited my answer, can you try again with the new path. Make sure my path matches yours. Commented Jan 9, 2020 at 7:24

1 Answer 1

2

"ModuleNotFoundError: No module named 'pandas'"

In order to solve your problem, you need to install the python module pandas. You can follow the following steps:

  1. Find python.exe which is in your QGIS folder. (Example: C:\OSGEO4~1\apps\Python37)
  2. Opens a command prompt
  3. Type the following command: cd C:\OSGEO4~1\apps\Python37 & python -m pip install pandas

Tell me if the installation of the module is done correctly and if your problem is solved.

2
  • 1
    Hi Vincent, is shown in the question post that the path to Python is: C:\OSGEO4~1\apps\Python37 (it is an OSGeo4W install), so the third point of your answer will return an error. Commented Jan 8, 2020 at 22:52
  • Hi Gabriel, thanks for your remark, I edited my post with his path. Commented Jan 9, 2020 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.