4

Issue

I feel like this is covered territory here, but the issue is has appeared on two separate occasions for me--first when upgrading from Ubuntu 12.04 to 14.04 in May. I got it fixed then, but I recently set up a virtualenv with and that has caused some crossed paths, so to speak. Signs are that python-qgis is installed and that it is a path issue at runtime.

qgis.org says to set my PYTHONPATH=/qgispath/share/qgis/python, and it appears that the package manager used /usr/share/qgis/python on my system.

My issue is that for troubleshooting purposes, I am not certain that is indeed where the python wrapper is located--certainly, using that path doesn't fix it, so I am looking for further troubleshooting tips.

Details below:

When booting qgis 2.4, I get

Couldn't load PyQGIS.
Python support will be disabled.


Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named qgis.core


Python version:
2.7.6 (default, Mar 22 2014, 23:03:41) 
[GCC 4.8.2]

QGIS version:
2.4.0-Chugiak 'Chugiak', exported

Python path:
['/usr/share/qgis/python', u'/home/aksel/.qgis2/python', u'/home/aksel/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/home/aksel/anaconda/lib/python2.7/site-packages/brewer2mpl-1.4-py2.7.egg', '/home/aksel/anaconda/lib/python2.7/site-packages/pandana-0.1dev-py2.7-linux-x86_64.egg', '/home/aksel', '/home/aksel/projects/urbansim', '/home/aksel/eclipse/plugins/org.python.pydev_2.8.1.2013072611/pysrc', '/home/aksel/projects/urbanaccess', '/home/aksel/projects/pandas_sql', '/home/aksel/gdata/gdata-2.0.18/src', '/home/aksel/.qgis/python', '/home/aksel/gdal-1.9.2', '/home/aksel/projects/urbansim/agglomeration', '/home/aksel/anaconda/lib/python2.7', '/home/aksel/anaconda/lib/python2.7/plat-x86_64-linux-gnu', '/home/aksel/anaconda/lib/python2.7/lib-tk', '/home/aksel/anaconda/lib/python2.7/lib-old', '/home/aksel/anaconda/lib/python2.7/lib-dynload', '/home/aksel/anaconda/lib/python2.7/site-packages', '/home/aksel/anaconda/lib/python2.7/site-packages/PIL', '/home/aksel/anaconda/lib/python2.7/site-packages/prettytable-0.7.2-py2.7.egg', '/home/aksel/anaconda/lib/python2.7/site-packages/runipy-0.1.0-py2.7.egg', '/home/aksel/anaconda/lib/python2.7/site-packages/setuptools-5.7-py2.7.egg']

My installed package versions include:

dpkg -l | grep qgis
rc  libqgis-analysis2.3.0   2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared analysis library
ii  libqgis-analysis2.4.0   2.4.0-0trusty3  amd64   QGIS - shared analysis library
rc  libqgis-core2.3.0   2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared core library
ii  libqgis-core2.4.0   2.4.0+trusty1   amd64   QGIS - shared core library
ii  libqgis-customwidgets2.4.0  2.4.0-0trusty3  amd64   QGIS custom widgets for Qt Designer
rc  libqgis-gui2.3.0    2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared gui library
ii  libqgis-gui2.4.0    2.4.0+trusty1   amd64   QGIS - shared gui library
rc  libqgis-networkanalysis2.3.0    2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared network analysis library
ii  libqgis-networkanalysis2.4.0    2.4.0-0trusty3  amd64   QGIS - shared network analysis library
rc  libqgis2.2.0    2.2.0-3+trusty1 amd64   QGIS - shared libraries
rc  libqgisgrass2.3.0   2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared grass library
ii  libqgisgrass2.4.0   2.4.0-0trusty3  amd64   QGIS - shared grass library
rc  libqgispython2.3.0  2.3.0+git20140619+0dd02ba~trusty1   amd64   QGIS - shared Python library
ii  libqgispython2.4.0  2.4.0-0trusty3  amd64   QGIS - shared Python library
rc  libqgissqlanyconnection2.4.0    2.4.0+trusty1   amd64   QGIS - shared sqlanywhere connection library
ii  python-qgis 2.4.0-0trusty3  amd64   Python bindings to QGIS
ii  python-qgis-common  2.4.0-0trusty3  all Python bindings to QGIS - architecture-independent files
ii  qgis    2.4.0-0trusty3  amd64   Geographic Information System (GIS)
ii  qgis-common 2.4.0-0trusty3  all QGIS - architecture-independent data
ii  qgis-plugin-globe   2.4.0-0trusty3  amd64   OSG globe plugin for QGIS
ii  qgis-plugin-globe-common    2.4.0-0trusty3  all OSG globe plugin for QGIS - architecture-independent data
ii  qgis-plugin-grass   2.4.0-0trusty3  amd64   GRASS plugin for QGIS
ii  qgis-plugin-grass-common    2.4.0-0trusty3  all GRASS plugin for QGIS - architecture-independent data
ii  qgis-providers  2.4.0-0trusty3  amd64   collection of data providers to QGIS
ii  qgis-providers-common   2.4.0-0trusty3  all collection of data providers to QGIS - architecture-independent files

Your Answer

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

Browse other questions tagged or ask your own question.