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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章