Graphics Reference
In-Depth Information
For computers that run a version of Linux, you can use the following:
export PYTHONPATH="/path/to/qgis/build/output/python/"
export LD_LIBRARY_PATH="/path/to/qgis/build/output/lib/"
export QGIS_PREFIX="/path/to/qgis/build/output/"
Note
Obviously, you will need to replace /path/to/qgis with the actual path of your QGIS
installation.
If you have QGIS installed in a nonstandard location, you might need to modify these
commands before they will work. To check if they have worked, start up the Python inter-
preter and enter the following command:
>>> import qgis
If everything goes well, you'll simply see the Python prompt:
>>>
On the other hand, you might see the following error:
ImportError: No module named qgis
In this case, the PYTHONPATH variable has not been set up correctly, and you will have to
check the commands you entered earlier to set this environment variable, and possibly
modify it to allow for a nonstandard location of the QGIS libraries.
Note
Note that in some cases, this isn't enough because the Python libraries are only wrappers
around the underlying C++ libraries; you might also need to tell your computer where to
find these C++ libraries. To see if this is a problem, you can try to do the following:
import qgis.core
You might get an error that looks like this:
ImportError: libqgis_core.so.1.5.0: cannot open shared
object file: No such file or directory
Search WWH ::




Custom Search