Created
May 13, 2018 08:51
-
-
Save FredGoo/1a3ac76d557f0060043a55e6c90a5add to your computer and use it in GitHub Desktop.
pypi 镜像使用帮助
This file contains hidden or 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
| pypi 镜像使用帮助 | |
| pypi 镜像每 5 分钟同步一次。 | |
| 临时使用 | |
| pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package | |
| 注意,simple 不能少, 是 https 而不是 http | |
| 设为默认 | |
| 修改 ~/.config/pip/pip.conf (Linux), %APPDATA%\pip\pip.ini (Windows 10) 或 $HOME/Library/Application Support/pip/pip.conf (macOS) (没有就创建一个), 修改 index-url至tuna,例如 | |
| [global] | |
| index-url = https://pypi.tuna.tsinghua.edu.cn/simple | |
| pip 和 pip3 并存时,只需修改 ~/.pip/pip.conf。 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment