Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update pip3 to its latest version in Ubuntu 18.04?

I get this error when running

$ pip3 install -U pip

Requirement already up-to-date: pip in ./dlenv/lib/python3.6/site-packages (10.0.1)
launchpadlib 1.10.6 requires testresources, which is not installed.

I have searched in apt and testresources seems to be installed already.

apt search testresources
Sorting... Done
Full Text Search... Done
python-testresources/bionic,bionic 2.0.0-2 all
  PyUnit extension for managing expensive test fixtures - Python 2.x

python3-testresources/bionic,bionic 2.0.0-2 all
  PyUnit extension for managing expensive test fixtures - Python 3.

I've gone through this github issue, which was not clear with a solution.

like image 437
Sebin Benjamin Avatar asked Jul 12 '18 03:07

Sebin Benjamin


1 Answers

Suggest installing pip by the PyPA guide on Ubuntu 18.04, since the pip version is too old if we install it by sudo apt install python3-pip.

Following work for me:

# curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

# python get-pip.py

BTW, the default location of pip is /usr/local/bin/pip, in case can't find the PATH.

like image 102
R.Liu Avatar answered Oct 08 '22 14:10

R.Liu