/usr/bin/python: No module named pip error when trying to use pip

I am following the installation guide for the Tensorflow Object Detection API, which determines the following:

//From within TensorFlow/models/research/ cp object_detection/packages/tf2/setup.py . python -m pip install --use-feature=2020-resolver .

When I run the second command, I the error:

/usr/bin/python: No module named pip

I have pip3 installed, as well as python2 and python3. What are my options here? Install a custom outdated pip file, which could possibly conflict with pip3?

Link to the tutorial: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tensorflow-object-detection-api-installation

Tried installing python-pip from commandline, it points to the pip3 package, so I need to find a way to use the old pip package, without breaking the newer pip one.


Did you install python-pip and/or python3-pip (depending on what you're looking to use)?

In Ubuntu, the pip module is not default-installed or default-available - it needs to be installed by running one of the following commands:

  • For Python 2: sudo apt install python-pip
  • For Python 3: sudo apt install python3-pip