Python 官方文档:入门教程 => 点击学习
【python】Anaconda以及Pip配置清华镜像源 文章目录 【Python】Anaconda以及Pip配置清华镜像源前言一、Conda配置清华镜像源1. 查看镜像源2. 删除添加源,恢
提示:
最近换了新电脑
,在使用Anaconda安装Python包时,系统会自动从默认源下载安装包,但是由于网络访问限制或网络连接速度较慢等原因,会导致安装失败或安装速度较慢。
因此,为了提高安装速度和稳定性,一些用户选择使用国内的镜像源,如清华镜像源。配置清华镜像源可以让用户从国内的服务器上下载Python包,这可以加快下载速度,并减少由于网络访问限制导致的下载失败等问题。
conda config --show channels
conda config --remove-key channels
#添加镜像源conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/mainconda config --add channels Https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/freeconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/rconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/proconda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2#终端显示包从哪个channel下载,以及下载地址是什么conda config --set show_channel_urls yes
代码如下(示例):
# some-package代表你需要安装的包pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
下面这种方式也是一样的
pip install some-package -i https://pypi.tuna.tsinghua.edu.cn/simple
代码如下(示例):
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i https://mirrors.aliyun.com/pypi/simple/ some-package清华大学开源软件镜像站:https://pypi.tuna.tsinghua.edu.cn/simple阿里云开源镜像站:https://mirrors.aliyun.com/pypi/simple/豆瓣:https://pypi.douban.com/simple/中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
来源地址:https://blog.csdn.net/weixin_44914727/article/details/130513081
--结束END--
本文标题: 【Python】Anaconda以及Pip配置清华镜像源
本文链接: https://www.lsjlt.com/news/387103.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-03-01
2024-03-01
2024-03-01
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
2024-02-29
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0