2

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...

2
  • You don't run -m pip install --upgrade pip from a python console, you run python -m pip install --upgrade pip from a command prompt
    – user2856
    Nov 28, 2021 at 10:07
  • thanks for this tip. I tried it but now have a SSL error trying to run it. ('WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.') Nov 29, 2021 at 13:17

1 Answer 1

1

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 :

  1. (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 it

  2. you go to your Qgis installation directory and you find OSGeo4W.bat, you double click it and you launch the shell

  3. if 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.