[Qgis-developer] Mac enviromental variable problem

Larry Shaffer larrys at dakotacarto.com
Tue Apr 9 03:24:55 PDT 2013

Hi Francesco,

On Tue, Apr 9, 2013 at 2:06 AM, francescoboccacci at libero.it <
francescoboccacci at libero.it> wrote:

> Hi all,
> i have a question about enviromental variable on Mac.
> From python shell i can import psycopg2 module. If i use Python console
> from
> QGIS this module it can found.
> I have to write:
> import sys
> sys.path.append('/opt/local/Library/Frameworks/Python.framework/Versions/2.
> 7/lib/python2.7/site-packages/')
> import psycopg2
> and now it works.
> How can fix it adding  permanently to QGIS enviromental variable?

Consult this recent discussion:

Basically, if you are using QGIS installed via kyngchaos or the nightly,
the app is built against Apple's system Python. As such, it looks for
modules installed in /Library/Python/2.7/site-packages, not under /opt.

Kyngchaos.com has an installer for that module that will properly install,
so that QGIS will find it.

There are other solutions, but that is the simplest.



> Thanks
> Francesco
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130409/1e4419ac/attachment-0001.html>

More information about the Qgis-developer mailing list