18

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.

enter image description here

7
  • 4
    Which operating system are you using? I also assume you're using python 2.7 and its pip, can you please confim? Commented Oct 25, 2018 at 15:05
  • 1
    What version of python are you using? Maybe a fresh install of python would do the trick? Commented Oct 25, 2018 at 15:06
  • 1
    If you have both python 2 and 3 installed, it’s possible that you’re only updating pip for the python2 install. You could try pip3 install —upgrade pip Commented Oct 25, 2018 at 15:16
  • 1
    "it just says the same thing" - would be helpful if you included just what exactly it says in your question. Commented Oct 25, 2018 at 15:42
  • 2
    Open the command prompt as administrator. Commented Oct 26, 2018 at 17:30

4 Answers 4

33

Upgrading pip

On Linux or macOS:

pip install -U pip

On Windows:

python -m pip install -U pip
Sign up to request clarification or add additional context in comments.

10 Comments

@caleb did you try running the command from an elevated prompt?
In order to open an elevated prompt you have to right click on the "Command Prompt" aplication and choose "Run as administrator". Please try this and report results while I also investigate for other possible solutions.
Oh, so basically running as administrator. I don't know if I tried running this command with that yet, so I'll try it.
Perfect, @CalebHawn! Please report results so we can keep fighting, if needed.
Sorry it took so long, @Pitto! I've been busy with school. Running the command as administrator seems to have worked! Now I'm having a problem with the module I'm supposed to have installed. I'm trying to use pip to install the Discord.py module with "pip install discord.py" which says it installed fine, but the "import discord" statement reports a module not found error. Not sure what to do here, or if it's even related.
|
5

Try with "python -m pip install --upgrade pip --user" It worked with me and I am with Win10.

1 Comment

Worked for me as well, thanks! OS specs: Edition >> Windows 10 Pro; Version >> 21H2; Installed on >> ‎3/‎12/‎2021; OS build >> 19044.1766; Experience >> Windows Feature Experience Pack 120.2212.4180.0. Python specs: 3.9.13.
3

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

1 Comment

Sorry, I'm currently trying it on Windows. I'm thinking of doing it on Linux instead, tho.
2

On OS X this worked for me

python -m pip install --upgrade pip

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.