[OSGeo Africa] Qgis.core in stand -alone py script
Tim Sutton
tim at kartoza.com
Fri May 13 05:41:42 PDT 2016
Hi
One good way to be sure you have your environment set up right is to create a launcher based on the qgis.bat file. You can see some notes on how we do this for PyCharm here:
https://github.com/inasafe/inasafe/wiki/Development-under-Windows#command-line-setup
The procedure should be pretty much the same for your app except of course you will call your app at the end of the batch file instead of opening a console.
Note that the paths above may be a bit out of date since it is a while since I tried the process on windows and update the wiki.
Hope that helps!
Regards
Tim
> On 13 May 2016, at 12:41, Chucker one <chucker1.47 at gmail.com> wrote:
>
> Hi All,
>
> I am trying to import qgis.core into a stand-alone python script. However, I encounter an import error stating no module named qgis.core.
>
> Background:
> I use a custom compiled version of qgis 2.14.1 and not an osgeo4w qgis installation.
> Python 2.7.11 (not the osgeo4w version)
> I have tried setting environment variables (path and pythonpath) but was unsuccessful.
> The OS is Win 7 64bit.
>
> Any advice will be appreciated.
>
> Regards
> Chris
>
> _______________________________________________
> Africa mailing list
> Africa at lists.osgeo.org
> You can UNSUBSCRIBE at http://lists.osgeo.org/mailman/listinfo/africa
—
Tim Sutton
Co-founder: Kartoza
Project chair: QGIS.org
Visit http://kartoza.com <http://kartoza.com/> to find out about open source:
Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services
Skype: timlinux
IRC: timlinux on #qgis at freenode.net
Kartoza is a merger between Linfiniti and Afrispatial
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160513/3291b482/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KartozaNewLogoThumbnail.jpg
Type: image/jpeg
Size: 6122 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160513/3291b482/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.osgeo.org/pipermail/africa/attachments/20160513/3291b482/attachment-0001.sig>
More information about the Africa
mailing list