I'm trying to configure PyScripter with QGIS. I've installed it using OSGeo4W and I'm following instructions to setup a pyscripter.bat file by copying content of qgis.bat file. I have the following code:

@echo off
call "%~dp0\o4w_env.bat"
call "%OSGEO4W_ROOT%"\apps\grass\grass-6.4.3\etc\env.bat
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-6.4.3\lib;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE_SIZE=1000000
Start "PyScripter" /B "C:\Program Files\PyScripter\PyScripter.exe" --python27 --pythondllpath=C:\OSGeo4W\bin

However when I run this file I get the following error and PyScripter exits after that.

enter image description here

Where am I wrong?


Following Polygeo's suggestion:

It is a problem of Python and the Windows registry:

  • For the moment, PyScripter can only use the Python versions that have entries in the Windows registry (as the official Python distribution versions, the Enthought Python Distribution or ArcPy)

  • The standalone QGIS installer installs Python 2.7 but does not create any registry entries (as the Anaconda Scientific Python Distribution, for example) so PyScripter does not recognize it.

However, there are solutions to use PyScripter with these versions. For the standalone QGIS version, one of them is given in Configure PyScripter to use with QGIS (and still use arcpy) on Windows

  • Thanks for sharing this but I already was following these links. I just changed --pythondllpath=C:\OSGeo4W\bin with --pythondllpath=%OSGeo4W_ROOT%\bin and It started working – M Omayr Mar 30 '14 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.