ubantu的python2与python3的相关兼容更新问题

Ubuntu14.04, 系统内同时装了Python3.3 和 2.7
用sudo apt-get install python-pip
sudo apt-get install python3-pip
分别装了两个版本对应的pip



## 对于 Linux ##
sudo pip install sth
# 或者明确版本
sudo pip2 install sth
sudo pip3 install sth

## 对于 Windows NT ##

# 如果仅安装 python2
pip install sth

# 如果安装有 python3, 则需要明确 pip 版本
py -2 -m pip install sth
py -3 -m pip install sth 

== update, 针对 Linux ==
在 pip, pip2, 或者 pip3 install 失败时,可以尝试如下操作:

# 以安装 youtube-dl 举例
# proxy_host:proxy_port 为代理地址
export https_proxy=proxy_host:proxy_port
sudo -H  pip install --upgrade youtube-dl
# 或 sudo -H  pip2 install --upgrade youtube-dl
# 或 sudo -H  pip3 install --upgrade youtube-dl
# 或 sudo -H  python3.5 -m pip install youtube-dl

pip 配置不好很影响 python 使用(的心情),但愿大家少走弯路。
原文地址:https://www.cnblogs.com/Peit/p/6349291.html