Skip to content

Commit

Permalink
dealing with the new version of python
Browse files Browse the repository at this point in the history
  • Loading branch information
MattReimer committed Sep 3, 2021
1 parent 24f7c7c commit 2b70ce6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,34 @@ The Riverscapes Analysis Visualization Explorer Plugin software was developed by

1. Make a batch file on your desktop to launch VSCode with the QGIS development paths and environment

fill in paths where appropriate. You'll need one of these files for each version of QGIS that you are developing on. You only need this file if you want to debug using breakpoints.
fill in paths where appropriate. NOTE: ALL THESE PATHS SHOULD BE CHECKED. They change from version to version!! You'll need one of these files for each version of QGIS that you are developing on. You only need this file if you want to debug using breakpoints.

```batch
@echo off
@REM First one needs an explicit path
call "C:\Program Files\QGIS 3.18\bin\o4w_env.bat"
call "C:\Program Files\QGIS 3.16.10\bin\o4w_env.bat"
call %OSGEO4W_ROOT%\bin\qt5_env.bat
call %OSGEO4W_ROOT%\bin\py3_env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin
path %PATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\bin
path %PATH%;%OSGEO4W_ROOT%\apps\Qt5\bin
path %PATH%;%OSGEO4W_ROOT%\apps\Python37\Scripts
path %PATH%;%OSGEO4W_ROOT%\apps\Python39\Scripts
rem o4w_env.bat starts with a clean path, so add what you need
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%:\=/%/apps/qgis
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%:\=/%/apps/qgis-ltr
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis-ltr\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python\
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python\qgis
@REM set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python\qgis\PyQt
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\python\
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis-ltr\python\qgis
@REM We include local python scripts since this is where pip installs to for ptvsd and pb_tool
path %PATH%;%APPDATA%\Python\Python37\Scripts
path %PATH%;%APPDATA%\Python\Python39\Scripts
pushd %~dp0
call "C:\Users\Matt\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd"
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/OSXDev.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"PATH": "${env:PATH}:${env:QGIS_PATH}/Contents/MacOS/bin"
},
// NOTE: For this to work you need an env file with "QGIS_PATH=/Applications/QGIS-LTR.app/Contents" or whatever your path is
"python.pythonPath": "${env:QGIS_PATH}/Contents/MacOS/bin/python3.8",
"python.pythonPath": "${env:QGIS_PATH}/Contents/MacOS/bin/python3.9",
},
"launch": {
"configurations": [],
Expand Down
2 changes: 1 addition & 1 deletion Workspaces/WindowsDev.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"titleBar.activeBackground": "#006823",
// "editor.background": "#1c2c2a"
},
"python.pythonPath": "${env:OSGEO4W_ROOT}/apps/Python37/python.exe",
"python.pythonPath": "${env:OSGEO4W_ROOT}/apps/Python39/python3.exe",
},
"launch": {
"configurations": [],
Expand Down

0 comments on commit 2b70ce6

Please sign in to comment.