将 pip 从 /usr/local/bin/pip 切换到 /usr/bin/pip

将 pip 从 /usr/local/bin/pip 切换到 /usr/bin/pip

我通过/usr/local/bin/pip执行sudo python3 -m pip install -U pip命令强制启动 pip 。

现在我想使用 pip from/usr/bin/pip

为了实现这一点,我将点重命名为/usr/local/bin/pip_backup

现在在我问,which pip或者which pip -a它只显示/usr/bin/pip

但我无法使用 pip 下载或安装任何包。它说:

[root@localhost file_name]# pip install snips-nlu

-bash: /usr/local/bin/pip: No such file or directory
some relevant

[root@localhost bot_v4.0]# which python -a /usr/bin/python 

[root@localhost bot_v4.0]# which pip -a /usr/bin/pip 
[root@localhost bot_v4.0]#

[root@localhost bot_v4.0]# ll /usr/bin/pip* 
-rwxr-xr-x. 1 root root 407 May 5 2018 /usr/bin/pip 
lrwxrwxrwx. 1 root root 9 May 5 2018 /usr/bin/pip-2 -> ./pip-2.7 
-rwxr-xr-x. 1 root root 407 May 5 2018 /usr/bin/pip2 
lrwxrwxrwx. 1 root root 8 May 5 2018 /usr/bin/pip-2.7 -> ./pip2.7 
-rwxr-xr-x. 1 root root 407 May 5 2018 /usr/bin/pip2.7 
lrwxrwxrwx. 1 root root 9 May 5 2018 /usr/bin/pip-3 -> ./pip-3.6   
lrwxrwxrwx. 1 root root 8 May 5 2018 /usr/bin/pip-3.6 -> ./pip3.6 
-rwxr-xr-x. 1 root root 16184 Oct 18 15:38 /usr/bin/pipewire

[root@localhost bot_v4.0]# ll /usr/local/bin/pip* 
-rwxr-xr-x. 1 root root 223 Apr 4 10:25 /usr/local/bin/pip2 
-rwxr-xr-x. 1 root root 223 Apr 4 10:25 /usr/local/bin/pip2.7 
-rwxr-xr-x. 1 root root 216 Apr 3 17:05 /usr/local/bin/pip3 
-rwxr-xr-x. 1 root root 216 Apr 3 17:05 /usr/local/bin/pip3.6 
-rwxr-xr-x. 1 root root 223 Apr 4 10:25 /usr/local/bin/pip_bak

相关内容