/usr/local/bin/python3: 第 85 行或附近没有名为 pip 的模块错误;退出时状态为 1

Ank*_*pta 16 apt software-installation pip jupyter

我正在安装英特尔 OpenVINO 工具套件,在其中配置模型优化器。

(ankit) ankit@ankit-HP-Notebook:~/intel/computer_vision_sdk_2018.3.343/deployment_tools/model_optimizer/install_prerequisites$ sudo ./install_prerequisites.sh
Hit:1 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease                     
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]     
Hit:4 http://archive.canonical.com xenial InRelease                            
Get:5 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]    
Get:6 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]  
Get:7 http://in.archive.ubuntu.com/ubuntu xenial-proposed InRelease [260 kB]
Fetched 583 kB in 2s (287 kB/s)   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
21 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-venv is already the newest version (3.5.1-3).
libgfortran3 is already the newest version (5.4.0-6ubuntu1~16.04.10).
python3-pip is already the newest version (8.1.1-2ubuntu0.4).
0 upgraded, 0 newly installed, 0 to remove and 21 not upgraded.
/usr/local/bin/python3: No module named pip
Error on or near line 85; exiting with status 1
Run Code Online (Sandbox Code Playgroud)

我已经尝试了很多事情,那么我该如何解决呢?

我尝试过很多事情

小智 14

这意味着您需要使用此命令安装 pip -

sudo apt install python3-pip
Run Code Online (Sandbox Code Playgroud)

如果 python3 是安装的唯一版本的 python,则pip在使用时应调用 pip3。


cos*_*bur 4

因为您已经python3-pip安装了软件包,所以您需要将其调用为pip3

pip3 list
sudo pip3 install virtualenv
Run Code Online (Sandbox Code Playgroud)


kar*_*rel 0

创建一个符号链接,在/usr/local/bin/python3/pip其中引用 file /usr/local/bin/pip2.7

sudo ln -s /usr/local/bin/pip2.7 /usr/local/bin/python3/pip  
Run Code Online (Sandbox Code Playgroud)

然后将目录更改为~/intel/computer_vision_sdk_2018.3.343/deployment_tools/model_optimizer/install_prerequisites并运行sudo ./install_prerequisites.sh