PyQGIS: Setting Up PyQGIS for Standalone Scripts on Windows

Опубликовано: 20 Май 2026
на канале: Practical GIS
5,000
80

This tutorial guides you through every step to set up PyQGIS on your Windows system, allowing you to create powerful standalone GIS scripts. From installation to validation, we cover everything you need.


===================== 5. Setting up PYTHONPATH ===========================
📌 For the Variable Value, paste:
C:\\Program Files\\QGIS 3.14\\apps\\qgis\\python;
C:\\Program Files\\QGIS 3.14\\apps\\qgis\\python\\plugins;
C:\\Program Files\\QGIS 3.14\\apps\\Qt5\\plugins;
C:\\Program Files\\QGIS 3.14\\share\\gdal;

⚠️ IMPORTANT NOTE :

When setting up your PYTHONPATH, please make sure to adjust the paths based on the specific version and type of QGIS you've installed:

Replace "QGIS 3.14" with the exact version number you've installed on your system.
If you've installed the Long Term Release (LTR) version of QGIS, change "qgis" to "qgis-ltr" in the paths.
For example:

Original: "C:\\Program Files\\QGIS 3.14\\apps\\qgis\\python;"
For LTR Version: "C:\\Program Files\\QGIS 3.14\\apps\\qgis-ltr\\python;"

Always double-check your paths to ensure they match your installation directories for a seamless setup experience.

=========================================================================


#PyQGIS #QGIS #StandaloneScripts #GISAutomation #WindowsSetup #PyQGISConfiguration #GISTutorials #QGISPythonLibraries #GISScripting #EnvironmentalVariables