I want to work with PyQGIS Python 3 using QGIS 3.2 standalone install. I created a simple batch file to work with PyQGIS but I have some errors.
Here's the batch file:
@echo off
SET OSGEO4W_ROOT=C:\Program Files\QGIS 3.2
call "%OSGEO4W_ROOT%"\bin\o4w_env
call "%OSGEO4W_ROOT%"\apps\grass\grass-7.4.1\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\grass\grass-7.4.1\lib
path %PATH%;%OSGEO4W_ROOT%\apps\Qt5\bin
path %PATH%;%OSGEO4W_ROOT%\apps\Python36\Scripts
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python
set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python36
SET PYCHARM="C:\Program Files\JetBrains\PyCharm 2018.1.4\bin\pycharm.exe
start "PyCharm aware of QGIS" /B %PYCHARM% %*
Error is:
File "C:\PROGRA~1\QGIS3~1.2\apps\Python36\lib\site.py", line 177
file=sys.stderr)
^
SyntaxError: invalid syntax
py3_env
. Not sure where it is, I don't have access to osgeo4w currently, probably somewhere likecall "%OSGEO4W_ROOT%"\bin\py3_env