[Qgis-developer] Build compile error
wonder.sk at gmail.com
Mon Jan 21 17:15:04 EST 2008
2008/1/21 volkan kepoglu <vkepoglu at gmail.com>:
> I am getting the following error in idle 1.2.1 of python 2.5.1
> >>> from PyQt4.QtCore import *
> >>> from PyQt4.QtGui import *
> >>> from qgis.core import *
> Traceback (most recent call last):
> File "<pyshell#2>", line 1, in <module>
> from qgis.core import *
> ImportError: No module named qgis.core
> I have tried to define the path as follows, in order to try all
> export PYTHONPATH=/usr/local/share/qgis/python
can you check that path /usr/local/share/qgis/python that there's
directory 'qgis' in which there are file core.so, gui.so and
if you've installed qgis to /usr/local prefix, you actually don't need
to set LD_LIBRARY_PATH since /usr/local/lib (where are the files
libqgis_core.so and libqgis_gui.so) is already in linker's search
path. Just make sure to call ldconfig after installing to update the
cache of system libraries.
> but nothing changed. the same error in python. module couldn't find.
> I do not know which path to define. in ccmake I accepted all default paths.
> what actually do these paths? is it required to define these paths for each
> session, I mean when ı closed the terminal, path assignment is disappearing.
when you do 'export' it will be working only in current shell. So you
have to do first export of PYTHONPATH variable and then in the same
console open python interpreter. Or you can do the same in Python -
before importing qgis modules you can add that path to python's
> should ı define ld_library_path as the path of source code:
no, it's not needed.
> should I re-build by setting BINDINGS_GLOBAL_INSTALL variable in CMake to
no, it's not necessary.
> maybe I should define in which path to install qgis, isn't it?
> but do not know how to define
> is CMAKE_BUILD_PREFIX (is it the path definition of installing qgis) the
> equilavent of CMAKE_INSTALL_PREFIX, because in ccmake version 2.4 there is
> no CMAKE_BUILD_PREFIX anymore?
it's okay to install it to default path (/usr/local) - if you don't
have any special reasons for not doing it, use the default path.
More information about the Qgis-developer