Last active
April 26, 2017 03:31
-
-
Save wsgzao/d465a70bfa8be1f98c4de2be4377a7e6 to your computer and use it in GitHub Desktop.
pip_windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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