Score:0

/usr/bin/python: No module named pip

kr flag

I am following this tutorial: https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install and more specifically: Install the Object Detection API

When I run this command:

python -m pip install --use-feature=2020-resolver .

I get:

/usr/bin/python: No module named pip

I tried the following combinations:

UbuntuUser@ubuntu:~/Desktop/TensorFlow/models/research$ sudo python -m pip install --use-feature=2020-resolver .
/usr/bin/python: No module named pip
UbuntuUser@ubuntu:~/Desktop/TensorFlow/models/research$ sudo python3 -m pip install --use-feature=2020-resolver .

Usage:   
  /usr/bin/python3 -m pip install [options] <requirement specifier> [package-index-options] ...
  /usr/bin/python3 -m pip install [options] -r <requirements file> [package-index-options] ...
  /usr/bin/python3 -m pip install [options] [-e] <vcs project url> ...
  /usr/bin/python3 -m pip install [options] [-e] <local project path> ...
  /usr/bin/python3 -m pip install [options] <archive url/path> ...

no such option: --use-feature
UbuntuUser@ubuntu:~/Desktop/TensorFlow/models/research$ sudo python3 -m pip3 install --use-feature=2020-resolver .
/usr/bin/python3: No module named pip3
UbuntuUser@ubuntu:~/Desktop/TensorFlow/models/research$ sudo python -m pip3 install --use-feature=2020-resolver .
/usr/bin/python: No module named pip3

Both pip and pip3 are install in Ubuntu Mate:

What is wrong?? I tried on google: /usr/bin/python: No module named pip , after installing pip it didn't help...

N0rbert avatar
zw flag
Run `sudo apt-get install python3-pip` and retry.
GammaGames avatar
in flag
You can see pip does work for `python3 -m pip`, you might have to update it. What does it print out when you do `python3 -m pip -V`? It's saying the `--use-feature` option doesn't exist, you might have to update it
just_learning avatar
kr flag
@N0rbert: `Reading package lists... Done Building dependency tree Reading state information... Done python3-pip is already the newest version (20.0.2-5ubuntu1.6). 0 upgraded, 0 newly installed, 0 to remove and 194 not upgraded.`
just_learning avatar
kr flag
@GammaGames: `pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)`
just_learning avatar
kr flag
@GammaGames: How do I update it?
just_learning avatar
kr flag
I tried this command: `pip install --upgrade pip` it successfully updated it but nothing was changed...
GammaGames avatar
in flag
@just_learning That option was added in 20.0.3, the `pyhon3 -m pip install --upgrade pip` should have worked. What if you leave off the option?
just_learning avatar
kr flag
@GammaGames: You mean not to run that command? Will the rest of the tutorial work?
GammaGames avatar
in flag
@just_learning I mean to only run `python -m pip install .` and see what happens. The `--use-feature=2020-resolver` is a feature added to allow users to use a newer dependency resolver.
just_learning avatar
kr flag
Ok, I followed with your command. When I go to training part, I get this: `File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/framework/ops.py", line 7107, in raise_from_not_ok_status raise core._status_to_exception(e) from None # pylint: disable=protected-access tensorflow.python.framework.errors_impl.InvalidArgumentError: jpeg::Uncompress failed. Invalid JPEG data or crop window. [[{{function_node case_cond_cond_jpeg_true_216}}{{node case/cond/cond_jpeg/DecodeJpeg}}]] [[MultiDeviceIteratorGetNextFromShard]] [[RemoteCall]] [Op:IteratorGetNext]` What is wrong?
just_learning avatar
kr flag
This suggestion here: https://stackoverflow.com/questions/62586443/tensorflow-error-when-trying-transfer-learning-invalid-jpeg-data-or-crop-windo didn't help...
GammaGames avatar
in flag
@just_learning I'm not sure, but that would be a problem for another question. I'm not familiar enough with tensorflow to know what the issue is
Score:1
in flag

As you can see, pip does work when invoked with python3 -m pip. From the comments we've discovered that you are running v20.0.2. The --use-feature option was not added until 20.2 and, since the usual command to upgrade pip was not working, we omitted the option and it ran successfully.

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.