Skip to content

Instantly share code, notes, and snippets.

@adrianrocamora
Forked from nepsilon/pip-mirror.md
Created June 18, 2020 21:10
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 adrianrocamora/2af928e065a9bffc1abfa664ddb65cd4 to your computer and use it in GitHub Desktop.
Save adrianrocamora/2af928e065a9bffc1abfa664ddb65cd4 to your computer and use it in GitHub Desktop.
Use another mirror when PyPI go down — First published in fullweb.io issue #52

Use another mirror when PyPI go down

Find a mirror geographically close to you and use it like this:

pip install -i https://[mirror-url]/simple package

For instance, using a Beijing mirror:

pip install -i https://pypi.douban.com/simple package

You can also save this config in your ~/.pip/pip.conf:

[global]
index-url = https://pypi.douban.com/simple
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment