Python: command "python -m pip install --upgrade pip" doesn't work - python

I want to upgrade my pip, but if I type in "python -m pip install --upgrade pip", then my command shell says "cannot find 'python'". Python is already installed and my command shell can't detect the command "python", though.

It depends on which version of python you are using:
pip3 install --upgrade pip
Or:
python3 -m pip install --upgrade pip
Try that as I suspect you are using python 3 which is why it doesn't work.

Related

pip3 installed without pip

I have pip3 installed from when I installed Python3 through Homebrew. But now when I use pip3 to install things, I get the following message:
You are using pip version 10.0.1, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
But when I use pip install --upgrade pip, I get the following message:
-bash: pip: command not found
I'm not sure what the precise terminology is, but should I be "linking" the pip command to pip3?
Upgrade pip3 as follows to avoid the confusion between pip and pip3:
python3 -m pip install --upgrade pip

python -m pip install --upgrade pip does not work

Upgrading pip does not do anything, just tells me to upgrade Pip again and that the requirements are satisfied--however, I am on an old pip version. This is Python27, I get the same issue whether I am in a virtual environment or not.
Output:
C:\Python27>python -m pip install --upgrade pip
Requirement already up-to-date: pip in c:\python27\lib\site-packages
You are using pip version 9.0.1, however version 19.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Versions Installed:
$ pip --version
pip 9.0.1 from c:\python27\lib\site-packages (python 2.7)
$ pip --version
pip 9.0.1 from c:\users\aroytikh\dev\flask-tutorial\venv\lib\site-
packages (python 2.7)
(venv)
I think it how to update pip will help you and make sure that you are running command prompt as Administrator. you can do this by right click on the "Command Prompt" application and choose "Run as administrator" and type this command in your command prompt.
python -m pip install -U pip
try this if it isn't working for you..
Download Pip 19.1.1
Install Pip using this command
$ python -m pip install downloads/pip-19.1.1-py2.py3-none-any.whl
or if it is tar.gz file then
$ python -m pip install downloads/pip-19.1.1.tar.gz

Unable to upgrade pip through cmd

This is the error I am getting in cmd
the pic of the error I am getting.
Try
python -m pip install --upgrade pip
pip3 install -U pip (for Python 3.x)
pip install -U pip (for Python 2.7)
easy_install -U pip
Try this:
python -m pip install --upgrade pip --user
It's permission issue. Need to add --user flag to the command.

python pip ask me to update but it is already updated

Every time I use pip to install some package, it says:
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
But when I run
python -m pip install --upgrade pip
It says:
Requirement already up-to-date:
Why is this happening?
Based on your comments, pip is linked to your python 3 installation. The version of pip included in your python 2 installation is up to date (as shown by the python -m ... command you ran).
To update pip for python3, run the same command but using python3 instead. Something like
python3 -m pip install --upgrade pip
Given that the pip you are using is saying it needs updating, you could also just run
pip install --upgrade pip

How to update Python pip?

I've had to install Python packages and libraries using pip, but every time I do, it says I'm using an older version of pip, and that v18.1 is available by running the command
python -m pip install --upgrade pip
When I run this command, it just says the same thing. It apparently can't update itself because it's outdated. Is there any way to get around this, maybe by manually updating it?
Thanks in advance, community!
Update: The OS I'm using is currently Windows 10 and Python 3.6.4. The following screenshot is what outputs when running the command.
Upgrading pip
On Linux or macOS:
pip install -U pip
On Windows:
python -m pip install -U pip
Try with "python -m pip install --upgrade pip --user"
It worked with me and I am with Win10.
If you are on linux try this -
sudo su root
apt-get purge -y python-pip
wget https://bootstrap.pypa.io/get-pip.py
python ./get-pip.py
apt-get install python-pip
or
sudo -H pip3 install --upgrade pip
sudo -H pip2 install --upgrade pip
On OS X this worked for me
python -m pip install --upgrade pip

Categories

Resources