3

I am following these instructions:

https://bitbucket.org/rptlab/reportlab

but i am getting this error:

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


Traceback (most recent call last):

  File "C:/PROGRA~1/QGISWI~1/apps/qgis/./python\qgis\utils.py", line 219, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/n/.qgis2/python/plugins\Importtool\__init__.py", line 34, in classFactory
    from .Import_tool import Importtool

  File "C:/PROGRA~1/QGISWI~1/apps/qgis/./python\qgis\utils.py", line 478, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)

  File "C:/Users/n/.qgis2/python/plugins\Importtool\Import_tool.py", line 39, in 
    import reportlab

  File "C:/PROGRA~1/QGISWI~1/apps/qgis/./python\qgis\utils.py", line 478, in _import

    mod = _builtin_import(name, globals, locals, fromlist, level)
ImportError: No module named reportlab
  • 2
    It seems you have installed the reportlab package in a standard way, that is outside the QGIS folder. Running QGIS, it will not see that installation. – AndreJ Aug 14 '15 at 8:21
2

Download http://peak.telecommunity.com/dist/ez_setup.py. Open your osgeo shell as admin - use the one associated with your QGIS install if you have more than one installed.

run:

python ez_setup.py

then

cd "C:\Program Files\QGIS Wien\apps\Python27\Scripts"
easy_install pip
pip install reportlab

Some of this I got from http://nathanw.net/2012/12/19/installing-python-setuptools-into-osgeo4w-python/. You'll need to change the QGIS directory for your system if it's different.

  • I suggest to put the path into quotation marks. Otherwise you will stumble over the blanks. – AndreJ Aug 14 '15 at 13:14
  • @AndreJ You're absolutely right. I added the quotes. Thanks. – user55937 Aug 14 '15 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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