我正在关注本教程: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
pip和pip3都安装在 Ubuntu Mate 中:
怎么了??我在谷歌上试过:/usr/bin/python: No module named pip ,安装 pip 后它没有帮助......
如您所见,使用 .pip 调用时 pip 确实有效
python3 -m pip
。从评论中我们发现您正在运行 v20.0.2。直到 20.2 才添加该--use-feature
选项,并且由于升级 pip 的常用命令不起作用,我们省略了该选项,它运行成功。