Why are there so many versions and locations of pip?
When I run pip install -U pip
it says it's updating to a newer version, then when I run pip --version
it's the un-updated version. I am on WSL.
When I run pip install -U pip
it says it's updating to a newer version, then when I run pip --version
it's the un-updated version. I am on WSL.
You can add the following to the command you are running to open Python
, then upgrade pip
through it's module.
EDIT: for clarification When Running the script for example in vscode or wsl your command will be the direct path to your specific python install. So whatever way you are starting the python script just adjust it to use pip upgrade
e.g.
/bin/Python3.10/python pythonScript.py
would be
/bin/Python3.10/python -m pip install --upgrade pip
Otherwise, you will need to update your Environmental Variables in WSL to use a certain version of python with 'python' and a certain pip with 'pip3'
EDIT2: Also VENV may help your situation :)
I think you have multiple Python version installed on the same machine, if this is the case try using pipx.x install --upgrade pip
where x.x
is the Python version you want to use.
As far as I know each Python installation has its own pip, so you need to select a specific version.
Then there is the system interpreter, which is the default Python version run by your terminal and this is the version used when you simply use pip
without any x.x
version selection.
See if this solves your issue.