[Qgis-developer] How to set the PyQGIS environnement on Windows properly?

Florin-Daniel Cioloboc cioloboc.florin at gmail.com
Tue May 5 14:42:48 PDT 2015


Hello everyone,

I'm having problems with a specific error, which is pretty common from what
I can see but can't seem to find a solution.

When I try to import the qgis module the following error occurs:

ImportError: No module named 'qgis'

So far this is the guide <http://planet.qgis.org/planet/user/3/> I'm using
and here's the settings for the .cmd, I'm assuming it has something to do
with this:

> @echo off
> SET OSGEO4W_ROOT=D:\OSGeo4W64
> call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
> call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.3\etc\env.bat at echo off
> path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
> path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib
>
> set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
> set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages
> set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis
> set PATH=C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.6\bin\pycharm.exe;%PATH%
> cd %HOMEPATH%\TER\development
> start "PyCharm aware of Quantum GIS" /B "C:\Program Files (x86)\JetBrains\PyCharm Community Edition 4.0.6\bin\pycharm.exe" %*
>
> I realize this is quite a beginner's question but in any case I could use
some help.

Best wishes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150505/2ddea1d6/attachment.html>


More information about the Qgis-developer mailing list