pip安裝筆記(anaconda)


1、更換python源

  

mkdir ~/.pip
cd ~/.pip
vi pip.conf

  vi編輯內容如下:

[global] 
index-url=https://pypi.tuna.tsinghua.edu.cn/simple 
[install] 
trusted-host=pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 6000 --------------------- 作者:ke1th 來源:CSDN 原文:https://blog.csdn.net/u012436149/article/details/66974668 版權聲明:本文為博主原創文章,轉載請附上博文鏈接!
上述內容中這一段是可選操作
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn disable-pip-version-check = true timeout = 6000

 

  下面是python常用的國內鏡像

新版ubuntu要求使用https源,要注意。
清華:https://pypi.tuna.tsinghua.edu.cn/simple
阿里雲:http://mirrors.aliyun.com/pypi/simple/
中國科技大學 https://pypi.mirrors.ustc.edu.cn/simple/
華中科技大學:http://pypi.hustunique.com/
山東理工大學:http://pypi.sdutlinux.org/
豆瓣:http://pypi.douban.com/simple/
--------------------- 
作者:木盞 
來源:CSDN 
原文:https://blog.csdn.net/leviopku/article/details/80113021 
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!

 

2、更換anaconda源

  terminal中輸入下面語句,添加清華的鏡像源到anaconda配置文件中

conda config --add channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/'
conda config --set show_channel_urls yes

  刪除anaconda中的鏡像源配置

conda config --remove channels 'https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

  查看anaconda的鏡像配置

conda config --show

  上述參考:https://blog.csdn.net/u012436149/article/details/66974668

        參考2,點

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM