The correct way to install on Ubuntu

I am trying to install the latest version of pip (currently 8.1.2) in the official ubuntu / trusty64 Vagrant box. The package includes Python 2.7.6 and 3.4.3, pre-installed with apt-get.

I read the dp installation file and contains the following warning:

Be careful if you are using a Python installation that is managed by your operating system or other package manager. get-pip.py does not coordinate with these tools and may leave your system in an inconsistent state.

Does this mean that I can not install pip using get-pip.py, and I am limited to install an older version from apt-get?

If there is a better way to install it, what would it be?

thanks

+26
source share
8 answers

I believe you can install it on Ubuntu using

sudo apt-get install python-pip 

or

 sudo apt-get install python3-pip 

for Python 3. Of course, this is an older version, but its functionality is there.

+39
source

Try downloading the installation package from https://pypi.python.org/pypi/pip#downloads and use python setup.py install

+6
source

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

+1
source

If you are using Ubuntu OS with Python2.7, follow these steps:

apt-get update

apt-get upgrade

apt-get install python-pip

To check pa installation version

pip --version

OR

If you are using Ubuntu OS with Python3, you can follow these steps

apt-get update

apt-get upgrade

apt-get install python3-pip

To verify the installation of pip3 version

pip3 --version

+1
source

The correct commands for installing pip and pip3 should be as follows:

 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 update pip3 and pip . The last line is critical because it re-binds pip with python 2.

0
source

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 
0
source

I think reading this link will help you.

click on this link to read

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

After the installation is complete, verify the installation by checking the version of pip:

  • pip --version;
-1
source

All Articles