I create a simple bat file to create standalone scripts using pyqgis. and that bat work nice .

I follow this manual now I want to use and arcpy together in the some script but I don't know how to define correct paths for the arcpy to work together with pyqgis Python api.

Any idea how to do this with this bat file ?

Practical is two different pythonpaths can i work together ?

I have windows 10 and ArcGIS 10.5.

Here the bat for pyqgis API:

call “%OSGEO4W_ROOT%“\bin\o4w_env.bat
call “%OSGEO4W_ROOT%“\apps\grass\grass-6.4.2\etc\env.bat
set GDAL_DRIVER_PATH=%OSGEO4W_ROOT%\bin\gdalplugins\1.9
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-6.4.2\lib
path %PATH%;”%OSGEO4W_ROOT%\apps\Python27\Scripts\”
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages
set QGISPATH=%OSGEO4W_ROOT%\apps\qgis
start "PyCharm aware of QGIS" /B %PYCHARM% %*
| improve this question | | | | |
  • I would suppose that this might be difficult since ArcGIS and QGIS both come with their own Python binaries (but I have to admit I haven't tried). – Jannes Oct 4 '17 at 18:17
  • @Jannes is good question I think – jessie jes Oct 4 '17 at 18:22

Your Answer

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

Browse other questions tagged or ask your own question.