Skip to content

Instantly share code, notes, and snippets.

@wsgzao
Last active April 26, 2017 03:31
Show Gist options
  • Save wsgzao/d465a70bfa8be1f98c4de2be4377a7e6 to your computer and use it in GitHub Desktop.
Save wsgzao/d465a70bfa8be1f98c4de2be4377a7e6 to your computer and use it in GitHub Desktop.
pip_windows
import os
ini="""[global]
index-url = https://pypi.doubanio.com/simple/
[install]
trusted-host=pypi.doubanio.com
"""
pippath=os.environ["USERPROFILE"]+"\\pip\\"
if not os.path.exists(pippath):
os.mkdir(pippath)
with open(pippath+"pip.ini","w+") as f:
f.write(ini)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment