[Qgis-user] Error importing qgis in python

Daniel Arribas-Bel daniel.arribas.bel at gmail.com
Thu Nov 5 08:47:16 PST 2009


That was my impression, Giovanni. But when I do as suggested in your link, I
get the following error:

dhcp-184-245:~ dreamessence$ python
> Python 2.5.2 (r252:60911, Feb 22 2008, 07:57:53)
> [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import qgis.core
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError:
> dlopen(/Applications/qgis1.0.0.app/Contents/MacOS/share/qgis/python/qgis/core.so,
> 2): Library not loaded: @executable_path/lib/libqgis_core.1.0.dylib
>   Referenced from:
> /Applications/qgis1.0.0.app/Contents/MacOS/share/qgis/python/qgis/core.so
>   Reason: image not found
> >>>
>

Any suggestion why this happens?

Thanks a bunch,

]d[

On Thu, Nov 5, 2009 at 4:53 PM, G. Allegri <giohappy at gmail.com> wrote:

> > I believe the Python features of Qgis are supposed to be used from within
> Qgis, either in plugins or the builtin python console.  It >certainly is
> compiled that way, even if it is supposed to be possible.
>
> That's not true. If you correctly setup the environment (path to qgis
> libraries, python modules, etc.) you can use qgis functionalities
> within python without starting up qgis itself.
> Look at here:
> http://desktopgisbook.com/Creating_a_Standalone_GIS_Application_1
>
> bye,
> giovanni
>



-- 
============================================================
Daniel Arribas-Bel
Url: darribas.org
Mail: darribas at unizar.es

Department of Economic Analysis
Universidad de Zaragoza (www.unizar.es)

GeoDa Center for Geospatial Analysis and Computation (geodacenter.asu.edu)
Arizona State University (USA)
============================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20091105/8ca184a8/attachment.html>


More information about the Qgis-user mailing list