同时装了 Python 3 和 Python 2,怎么用 pip ?

1 Linux

1.1 查看 python 版本

python 2:

python --version

python 3:

python3 --version

1.2 安装 pip 3

sudo apt-get update

sudo apt install python3-pip

1.3 查看 pip 版本

python 2:

python 3:

1.4 使用 pip 安装库

例子:

pip install requests

pip3 install requests
原文地址:https://www.cnblogs.com/PikapBai/p/14119142.html