python国内豆瓣源
豆瓣:https://pypi.doubanio.com/simple/
pip3 install -i https://pypi.doubanio.com/simple/ selenium
easy_install -i https://pypi.doubanio.com/simple/ selenium
pip install -U selenium -i "https://pypi.doubanio.com/simple/"
pip install selenium -i http://mirrors.aliyun.com/pypi/simple/
pip –upgrade批量更新过期的python库
查看系统里过期的python库,可以用pip命令
pip list #列出所有安装的库
pip list --outdated #列出所有过期的库
pip install --upgrade 库名 #但此命令不支持全局全部库升级
python -m pip install --upgrade pip #更新pip本身
#全部更新
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name, shell=True)