15

I get this error when running

pip3 install -U pip

Output:

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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Sebin Benjamin
  • 1,758
  • 2
  • 21
  • 45

3 Answers3

15

Try this:

sudo apt install python3-testresources
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
jits_on_moon
  • 827
  • 6
  • 10
4

I 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.

The 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.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
R.Liu
  • 361
  • 3
  • 6
-2

Try this:

sudo apt-get remove python-pip python-dev

This will remove the pip and Python. Then install the required version of Python and pip.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131