使用pip升级所有安装的package
升级的时候注意权限
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade -i https://pypi.douban.com/simple/ " + dist.project_name, shell=True)
升级的时候注意权限
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade -i https://pypi.douban.com/simple/ " + dist.project_name, shell=True)