Using Python from both OSGeo4W and ArcGIS Desktop?

No. Different Python Major.Minor versions have different ABIs, so any C extension/DLL/core module in one version of Python won't work in another. If one application imports Python26.dll it is keyed to Python 2.6 no matter what.


If you go with the default install of osgeo4w it will create a folder on the c drive for all the osgeo projects. this will also have a launcher for the osgeo4w commandline environment which is nicely self-contained. (it usually places a shortcut to the desktop as well)

You just have to remember to launch that and not cmd if you want to use the osgeo python install.


If you want an simple IDE like "idle" to write Pythonscripts, you could use Pythonwin under %OSGEO4W_ROOT%\apps\python27\lib\site-packages\pythonwin\Pythonwin.exe where %OSGEO4W_ROOT% usually points to C:\OSGeo4W

Here is a batch-File I'vh put on my desktop to start it:

@echo on

SET OSGEO4W_ROOT=C:\OSGeo4W

call %OSGEO4W_ROOT%\bin\o4w_env.bat

SET PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis\python;%OSGEO4W_ROOT%\apps\python27\lib;%OSGEO4W_ROOT%\apps\python27\lib\site-packages

SET PATH=%OSGEO4W_ROOT%\apps\qgis\bin;%PATH%

CD %OSGEO4W_ROOT%\apps\python27\lib\site-packages\pythonwin
call %OSGEO4W_ROOT%\apps\python27\lib\site-packages\pythonwin\Pythonwin.exe %*