Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade pip3?

I want to use python3.5 for development, but many times when I install the module for python 3.5, it always fails. The terminal tells me that a higher version is available, but it doesn't work when I upgrade it. enter image description here

like image 274
EdgarX Avatar asked Jul 27 '16 12:07

EdgarX


People also ask

How do I update pip3 on Mac?

To upgrade pip on Mac, type the python -m pip install –upgrade pip.

How can I upgrade pip in CMD?

go to command prompt. and use this command. python -m pip install -–upgrade pip. Dont forget to restart the editor,to avoid any error.


2 Answers

You are using pip3 to install flask-script which is associated with python 3.5. However, you are trying to upgrade pip associated with the python 2.7, try running pip3 install --upgrade pip.

It might be a good idea to take some time and read about virtual environments in Python. It isn't a best practice to install all of your packages to the base python installation. This would be a good start: http://docs.python-guide.org/en/latest/dev/virtualenvs/

like image 119
JanHak Avatar answered Oct 17 '22 08:10

JanHak


To upgrade your pip3, try running:

sudo -H pip3 install --upgrade pip 

Your pip may move from /bin to /usr/local/bin

To upgrade pip as well, you can follow it by:

sudo -H pip2 install --upgrade pip 
like image 29
BhushanDhamale Avatar answered Oct 17 '22 08:10

BhushanDhamale