<div dir="ltr">Hi Francesco,<div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 2:06 AM, <a href="mailto:francescoboccacci@libero.it">francescoboccacci@libero.it</a> <span dir="ltr"><<a href="mailto:francescoboccacci@libero.it" target="_blank">francescoboccacci@libero.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
i have a question about enviromental variable on Mac.<br>
>From python shell i can import psycopg2 module. If i use Python console from<br>
QGIS this module it can found.<br>
I have to write:<br>
import sys<br>
sys.path.append('/opt/local/Library/Frameworks/Python.framework/Versions/2.<br>
7/lib/python2.7/site-packages/')<br>
import psycopg2<br>
<br>
and now it works.<br>
How can fix it adding  permanently to QGIS enviromental variable?<br></blockquote><div><br></div><div>Consult this recent discussion:<br><a href="http://osgeo-org.1560.x6.nabble.com/error-running-qgis-master-sextante-depends-on-psycopg2-but-this-dependency-isn-t-well-known-td5023977.html#a5042252">http://osgeo-org.1560.x6.nabble.com/error-running-qgis-master-sextante-depends-on-psycopg2-but-this-dependency-isn-t-well-known-td5023977.html#a5042252</a><br>
<br></div><div>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.<br>
<br>Kyngchaos.com has an installer for that module that will properly install, so that QGIS will find it.<br><a href="http://www.kyngchaos.com/software/python">http://www.kyngchaos.com/software/python</a><br><br></div><div>
There are other solutions, but that is the simplest.<br></div><div><br></div><div>Regards,<br></div><div><br></div><div>Larry<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Thanks<br>
<br>
Francesco<br>
<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br></div></div></div>