Python更換國內源

Linux/Mac下,修改 ~/.pip/pip.conf (沒有就創建一個), 修改 index-url至tuna,內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
  
Windows下,直接在user目錄中創建一個pip目錄,如:C:\Users\xx\pip,新建文件pip.ini,內容如下:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

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