Anaconda更新最新版本、下载慢问题及更新conda版本

您所在的位置:网站首页 windows更新大概多久 Anaconda更新最新版本、下载慢问题及更新conda版本

Anaconda更新最新版本、下载慢问题及更新conda版本

2024-06-27 15:37| 来源: 网络整理| 查看: 265

一、下载最新Anaconda版本两种方法

1.Anaconda官网

官网 之前一篇有介绍怎么下载点击。

2.清华大学开源软件镜像站 https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/?C=M&O=D 清华镜像源网站 在这里插入图片描述

二、Anaconda环境里下载速度都比较慢

输入conda info查看一些信息

(base) C:\Users\Administrator>conda info active environment : base active env location : D:\Anaconda shell level : 1 user config file : C:\Users\Administrator\.condarc populated config files : C:\Users\Administrator\.condarc conda version : 4.5.11 conda-build version : 3.15.1 python version : 3.7.0.final.0 base environment : D:\Anaconda (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : D:\Anaconda\pkgs C:\Users\Administrator\AppData\Local\conda\conda\pkgs envs directories : D:\Anaconda\envs C:\Users\Administrator\AppData\Local\conda\conda\envs C:\Users\Administrator\.conda\envs platform : win-64 user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Windows/10 Windows/10.0.19041 administrator : True netrc file : None offline mode : False

解决办法:

1.添加国内镜像源 下面解释什么是镜像源 运行Anaconda Prompt

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/

2.设置启动设置好的国内镜像源 conda config --set show_channel_urls yes

3.查看是否添加上了源 conda config --show

4.如果镜像源失效了,或者想换成其他的源,怎么删除呢? conda config --remove channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/ conda config --remove channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/

(pytorch36) C:\Users\Administrator>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ (pytorch36) C:\Users\Administrator>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ (pytorch36) C:\Users\Administrator>conda config --set show_channel_urls yes (pytorch36) C:\Users\Administrator>conda info active environment : pytorch36 active env location : D:\Anaconda\envs\pytorch36 shell level : 2 user config file : C:\Users\Administrator\.condarc populated config files : C:\Users\Administrator\.condarc conda version : 4.5.11 conda-build version : 3.15.1 python version : 3.7.0.final.0 base environment : D:\Anaconda (writable) channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/noarch https://repo.anaconda.com/pkgs/r/win-64 https://repo.anaconda.com/pkgs/r/noarch https://repo.anaconda.com/pkgs/pro/win-64 https://repo.anaconda.com/pkgs/pro/noarch https://repo.anaconda.com/pkgs/msys2/win-64 https://repo.anaconda.com/pkgs/msys2/noarch package cache : D:\Anaconda\pkgs C:\Users\Administrator\AppData\Local\conda\conda\pkgs envs directories : D:\Anaconda\envs C:\Users\Administrator\AppData\Local\conda\conda\envs C:\Users\Administrator\.conda\envs platform : win-64 user-agent : conda/4.5.11 requests/2.19.1 CPython/3.7.0 Windows/10 Windows/10.0.19041 administrator : True netrc file : None offline mode : False

补充:镜像源 镜像:比如你照镜子,里面的成像,这里的镜像,是一种文件格式,是镜像文件的简称,举例,你租房时房东给你了一把钥匙A,你出于各种目的(怕丢,给女友,给小伙伴)又配了一把钥匙B,这两把钥匙从功能上都能开你家的门,钥匙B就是钥匙A的镜像。 源(来源):下载软件一般来源都是网站,网站存储在服务器上,有的服务器在国内,有的在国外。 镜像源:镜像的来源,一般指国内存放国外软件镜像的网站、服务器。为啥需要镜像源,在国内由于各种原因下载或更新国外的软件(比如python)网速特别慢甚至连不上。Ubuntu、Python、Nodejs、MySQL、Git、Chromium、Docker、Homebrew 等一系列的常用开源系统、软件都是国外开发的,下载地址位于国外,从国内访问、下载、更新。所以找个镜像网站就解决了。

目前有那些镜像源

清华源 https://mirrors.tuna.tsinghua.edu.cn/

腾讯源 https://mirrors.cloud.tencent.com/

阿里源 https://developer.aliyun.com/mirror/

华为源 https://mirrors.huaweicloud.com/home

网易源 http://mirrors.163.com/

淘宝 NPM 镜像 https://developer.aliyun.com/mirror/NPM

豆瓣 Python PyPI 镜像 http://pypi.doubanio.com/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/

%%比如使用方法:以Python环境下pip安装keras为例 pip install keras==2.3.1 -i http://pypi.douban.com/simple/ //2.3.1为所需版本号,尾部url为对应镜像源地址

访问速度方面,大型商业公司、尤其是云服务商(没错,指的是腾讯源、阿里源和华为源)的镜像站会做得更好,毕竟钱多、基础设施广。

三、更新conda

代码和显示如下

(pytorch36) C:\Users\Administrator>conda update -n base -c defaults conda %%输入以上代码,光标开始闪烁 Solving environment: done ## Package Plan ## environment location: D:\Anaconda added / updated specs: - conda The following NEW packages will be INSTALLED: charset-normalizer: 2.0.4-pyhd3eb1b0_0 conda-package-handling: 1.9.0-py37h8cc25b3_0 libarchive: 3.3.3-h0643e63_5 liblief: 0.11.5-hd77b12b_1 lz4-c: 1.8.1.2-h2fa13f4_0 m2-msys2-runtime: 2.5.0.17080.65c939c-3 m2-patch: 2.7.5-2 py-lief: 0.11.5-py37hd77b12b_1 python-libarchive-c: 2.9-pyhd3eb1b0_1 toml: 0.10.2-pyhd3eb1b0_0 xz: 5.2.6-h8cc25b3_0 zstd: 1.3.7-h508b16e_0 The following packages will be UPDATED: ca-certificates: 2018.03.07-0 --> 2022.07.19-haa95532_0 certifi: 2018.8.24-py37_1 --> 2022.9.24-py37haa95532_0 conda: 4.5.11-py37_0 --> 22.9.0-py37haa95532_0 conda-build: 3.15.1-py37_0 --> 3.22.0-py37haa95532_0 cryptography: 2.3.1-py37h74b6da3_0 --> 3.3.2-py37hcd4344a_0 curl: 7.61.0-h7602738_0 --> 7.82.0-h2bbff1b_0 libcurl: 7.61.0-h7602738_0 --> 7.82.0-h86230a5_0 libpng: 1.6.34-h79bbb47_0 --> 1.6.37-h2a8f88b_0 libssh2: 1.8.0-hd619d38_4 --> 1.10.0-hcd4344a_0 openssl: 1.0.2p-hfa6e2cd_0 --> 1.1.1q-h2bbff1b_0 pycurl: 7.43.0.2-py37h74b6da3_0 --> 7.45.1-py37hcd4344a_0 qt: 5.9.6-vc14h1e9a669_2 --> 5.9.7-vc14h73c81de_0 requests: 2.19.1-py37_0 --> 2.28.1-py37haa95532_0 sqlite: 3.24.0-h7602738_0 --> 3.39.3-h2bbff1b_0 vs2015_runtime: 14.15.26706-h3a45250_0 --> 14.27.29016-h5e58377_2 Proceed ([y]/n)? y Preparing transaction: done Verifying transaction: done Executing transaction: done %%到这里代表更新成功


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3