pip,conda安裝包臨時或者永久使用國內的源 ( 這裏使用清華的源 )

清華pypi源的網址:https://pypi.tuna.tsinghua.edu.cn/simple
清華conda源的網址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

PIP 換源
臨時更改:

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

pip -i 選定從哪個網站下載python包

永久更改:

pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

pip config set global.index-url + url

conda換源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章