Score:1

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

fr flag

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.

Score:2
ru flag

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
fr flag
I did that - it defaults to pip3. I need to use regular pip.
ru flag
@gogoboys That's why you need to install `python-pip` and NOT `python3-pip` - or, make sure you're executing this with python 2 and not Python 3. Start by checking what `ls -al $(which python)` shows to see what Python version it's pointing at, then work from there.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.