如果我尝试使用,pip3
我会看到:
$ pip3 --version
Command 'pip3' not found, but can be installed with:
sudo apt install python3-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).
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
然后:
$ pip3 --version
Command 'pip3' not found, but can be installed with:
sudo apt install python3-pip
这些指示是错误的吗?
答案1
我按照此解决方案中的说明修复了它无法使用 apt-get 正确安装 pip3:
使用以下方式卸载 pip3
sudo apt-get remove python3-pip
删除目录
$HOME/.local/lib/python3.6/site-packages # (python3.6 instead of 3.5)
使用 apt-get 重新安装 pip3
sudo apt-get install python3-pip
答案2
此后我做了:
python3 -m pip install --upgrade pip
然后 pip3 -V 回复:pip 20.2.2 from /home/…