I'm trying to install the latest version of pip (currently 8.1.2) on the official ubuntu/trusty64 Vagrant box. The box comes with Python 2.7.6 and 3.4.3 pre-installed with apt-get.

I read the pip installation doc and it contains the following warning:

Be cautious if you're using a Python install that's managed by your operating system or another package manager. get-pip.py does not coordinate with those tools, and may leave your system in an inconsistent state.

Does that mean I cannot install pip using get-pip.py and I am limited to install an older version of it from apt-get?

If there is a better way of installing it, what would it be?

Thanks

4

8 Answers

I believe that you can install it on Ubuntu with

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip 

for Python 3. Sure, it's an older version but its functionality is there.

3

Try download install package from and use python setup.py install

1

if it is outdated you can use the following command: sudo pip install --upgrade pip

If you are using Ubuntu OS with Python2.7 You can follow below steps

apt-get update

apt-get upgrade

apt-get install python-pip

To check install pip version

pip --version

OR

If you are using Ubuntu OS with Python3 You can follow below steps

apt-get update

apt-get upgrade

apt-get install python3-pip

To check install pip3 version

pip3 --version

The proper commands to install pip and pip3 should be the following:

sudo apt-get install python-pip python3-pip --yes sudo python3 -m pip install pip --upgrade --force-reinstall sudo python -m pip install pip --upgrade --force-reinstall # this must come after upgrading pip3 

The last two lines get pip3 and pip up-to-date. The last line is critical because it re-associates pip with python 2.

This worked for me on ubuntu 18.0.4:

1- sudo apt-get update 2- sudo apt-get upgrade 3- sudo apt-get install python-pip 4- pip -V 
 Install in the ubuntu software,Python,django and pip 

sudo apt update sudo apt install python2 curl --output get-pip.py sudo python2 get-pip.py sudo apt-get install python3-distutils

  • sudo apt-get update;
  • sudo apt-get install python-pip;

Once the installation is complete, verify the installation by checking the pip version:

  • pip --version;

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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