<div dir="ltr"><div>Hi Nick,<br><br></div>Welcome to using QGIS.<br><br>In Terminal, you'll want to set the following:<br><br> export PYTHONPATH=/Applications/QGIS.app/Contents/Resources/python<br><div class="gmail_extra">
<br></div><div class="gmail_extra">Or, when importing from within a Python module, or at Python console's prompt in Terminal, you can append that path to the Python executable's sys.path:<br><br></div><div class="gmail_extra">
import sys<br></div><div class="gmail_extra"> sys.path.append('/Applications/QGIS.app/Contents/Resources/python')<br clear="all"></div><div class="gmail_extra"><div><br></div><div>Alternatively, and more to the benefit of understanding PyQGIS, you can use the Python Console within a running QGIS app, which uses QGIS's embedded Python executable.<br>
<br></div><div>Here are the current docs for the upcoming 2.0 release, though much of it works fine for 1.8:<br><a href="http://docs.qgis.org/2.0/html/en/docs/pyqgis_developer_cookbook/">http://docs.qgis.org/2.0/html/en/docs/pyqgis_developer_cookbook/</a><br>
</div><div><br></div><div>Regards,<br></div><div><br>Larry</div>
<br><br><div class="gmail_quote">On Sat, Sep 7, 2013 at 11:28 AM, Nick Eubank <span dir="ltr"><<a href="mailto:nickeubank@gmail.com" target="_blank">nickeubank@gmail.com</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">
<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:12.7273px">Hi All,</span><div style="font-family:arial,sans-serif;font-size:12.7273px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7273px">
I'm very new to qgis (moving over from Arc), and I'm having trouble importing qgis 1.8.0. </div><div style="font-family:arial,sans-serif;font-size:12.7273px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7273px">
It seems I'm successfully setting the environment variable correctly to "/Applications/QGIS.app/Contents/Resources/python" (I can get it to echo back), and when I look in that folder I can see "core.so", but I keep getting "<b>ImportError:</b> 'No module named qgis.core'".</div>
<div style="font-family:arial,sans-serif;font-size:12.7273px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7273px">Any suggestions?</div><div style="font-family:arial,sans-serif;font-size:12.7273px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.7273px">Thanks for helping the noob. </div><span class=""><font color="#888888"><div style="font-family:arial,sans-serif;font-size:12.7273px"><br></div><div style="font-family:arial,sans-serif;font-size:12.7273px">
Nick</div></font></span></div>
<br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></blockquote></div><br></div></div>