pip換源_命令行下一步到位

首先打開cmd:
輸入

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

直接一步到位,不用費勁巴拉的創文件之類的。

然後貼幾個國內源:

阿里雲 http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清華大學 https://pypi.tuna.tsinghua.edu.cn/simple/
中國科學技術大學 http://pypi.mirrors.ustc.edu.cn/simple/

如果臨時使用的話,可以採用

pip install +庫名 -i +源
eg:    pip install numpy -i http://mirrors.aliyun.com/pypi/simple/
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章