Feature request #21207
Include a script to launch command line with current Python installation configured to bin folder
Status: | Open | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Jürgen Fischer | ||
Category: | Windows Package | ||
Pull Request or Patch supplied: | Yes | Resolution: | |
Easy fix?: | Yes | Copied to github as #: | 29025 |
Description
On Windows, QGis ships with a python-qgis.bat batch file (located in bin folder) which can be used to launch the python interpreter used by QGis GUI (the one you get in QGis Python Console), without needing to launch the whole GUI.
However, it seems there is no way to launch a system command line configured with that same interpreter (OSGeo4W.bat script seems to be configured to run a Python 2 interpreter instead of Python3 as of QGis 3.4.4).
Having such a script is quite handy in order to run Python QGis standalone applications, or to install additional Python packages to the ones installed by default by running pip3.
I am attaching a cmd-python-qgis.bat.tmpl based on the standard python-qgis.bat.tmpl file which launches an msdos console with PythonPath configured to execute QGis python3. Executing python3 and pip3 in the new console works fine (although python and pip appear to be conflicting with the installed python 2).