清華大學 pip 源

pypi 鏡像使用幫助

pypi 鏡像每 5 分鐘同步一次。url

臨時使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package

注意,simple 不能少, 是 https 而不是 httpcode

設爲默認

修改 ~/.config/pip/pip.conf (Linux), %APPDATA%\pip\pip.ini (Windows 10) 或 $HOME/Library/Application Support/pip/pip.conf (macOS) (沒有就建立一個), 修改 index-url至tuna,例如ip

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

pip 和 pip3 並存時,只需修改 ~/.pip/pip.conf同步

相關文章
相關標籤/搜索