I'm trying to run the Aequilibrae package on QGIS 3.16.14 (on windows)and to do so, it seems that I need to update my pip package.
I tried the command :
-m pip install --upgrade pip
on the integrated python console, but I had an invalid syntax error pointing to the first 'p' of 'pip'.
Since it was the recommended command and I am very new to the python console, I have to admit I'm a bit lost...
1 Answer
you need to run the upgrade from osgeo4w shell. I tested it on my machine (win 10 Qgis 3.16.13) and it seems to work.
To find the shell two ways :
(if you are on windows) you use windows indexation by pressing windows button on your keyboard and typing the first letters of
OSGeo4W
, it should appear and you can launch ityou go to your Qgis installation directory and you find
OSGeo4W.bat
, you double click it and you launch the shellif you are on another OS, you need to find this shell too, but I dont know where, probably in your installation directory as well
(if you type python
in the shell, it should start the interpreter for the python distributed with Qgis, you can exit it by typing exit()
)
Then, you can run python -m pip install --upgrade pip
.
In my case I had warnings
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'myOwnPersonalPath\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-21.3.1
If you then go to the python console in qgis you can check the version by typing :
import pip
pip.__version__
it should be the upgraded one
see Installing 3rd party python libraries for QGIS on Windows for more details
-m pip install --upgrade pip
from a python console, you runpython -m pip install --upgrade pip
from a command prompt