sudo pip 卸载sudo:pip:未找到命令

sudo pip 卸载sudo:pip:未找到命令

我尝试过卸载pip uninstall tensorflow-gpu,但PermissionError: [Errno 13] Permission denied: '/usr/local/bin/freeze_graph'还是sudo pip uninstall tensorflow-gpu不行sudo: pip: command not found,这是否意味着只有我的用户才有pip?如何解决?

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic

python -V
Python 3.6.8

which pip

sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (9.0.1-2.3~ubuntu1.18.04.1).

which pip3
/usr/bin/pip3

答案1

尝试这个:

sudo python3 -m pip uninstall tensorflow-gpu

答案2

sudo pip3 uninstall tensorflow-gpu工作正常。

相关内容