14

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.

Sebin Benjamin
  • 1,702
  • 1
  • 17
  • 42

3 Answers3

14

try this,

sudo apt install python3-testresources
jits_on_moon
  • 796
  • 5
  • 10
4

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.

R.Liu
  • 191
  • 1
  • 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