My goal is to run QGIS processing algorithms using a python script on an ubuntu server.

I have installed QGIS on the server using

 $ sudo apt-add-repository ppa:ubuntugis/ubuntugis-unstable
 $ sudo apt-get update
 $ sudo apt-get install qgis

from this answer to Installing QGIS on Ubuntu. The install was successful.

I have tried importing qgis.core but I get the module not found error.

I think I need to add some lines to the PYTHONPATH variable based on other answers. I've added the following:


But I'm still not able to import qgis.core.

How can I direct Python to the correct libraries on the Ubuntu server?

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.