Skip to content

Instantly share code, notes, and snippets.

@skychan
Last active February 15, 2017 01:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skychan/e4548d354bc986fdaeb0 to your computer and use it in GitHub Desktop.
Save skychan/e4548d354bc986fdaeb0 to your computer and use it in GitHub Desktop.
pip config and upgrade all for me
[global]
index-url = http://pypi.douban.com/simple
no-cache-dir = false
[install]
trusted-host=pypi.douban.com
[global]
index-url = http://pypi.mirrors.ustc.edu.cn/simple
no-cache-dir = false
[install]
trusted-host=pypi.mirrors.ustc.edu.cn
#!/usr/local/bin/python2.7
import pip
from subprocess import call
for dist in pip.get_installed_distributions():
call("pip install --upgrade " + dist.project_name + " --user", shell=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment