我正在关注这个教程:https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install更具体地说: 安装对象检测 API
当我运行此命令时:
python -m pip install --use-feature=2020-resolver .
我得到:
/usr/bin/python: No module named pip
我尝试了以下组合:
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
两个都点子和pip3安装在 Ubuntu Mate 中:
出了什么问题?我在谷歌上试过:安装 pip 后,/usr/bin/python:没有名为 pip 的模块没有帮助……
答案1
如您所见,使用 调用时,pip 确实可以工作python3 -m pip
。从评论中我们发现您正在运行 v20.0.2。该--use-feature
选项直到 20.2 才添加,由于升级 pip 的常用命令不起作用,我们省略了该选项并成功运行。