Conda Install Package Error[通俗易懂]

Conda Install Package Error[通俗易懂]问题:conda无法安装更新,报错内容如下:参考链接:condahttperrorhttpnonenoneforurlnoneAnaconda更新失败$condacreate-ntensorflowpython=3.5Fetchingpackagemetadata…….CondaHTTPError:HTTP000CONNECTIONFAILED

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE稳定放心使用

安利好朋友写的美食文牛排到底要点几分熟,我觉得写得真不错 ,有兴趣的朋友们可以点开看看哟!

CondaHTTPError: HTTP 000 CONNECTION FAILED for url

问题:conda无法安装更新,报错内容如下:

conda create -n tensorflow python=3.5

Fetching package metadata .......
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/linux-64/rpodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='nanomirrors.tuna.tsinghua.edu.cn', port=443): Max retries exceded with url: /anaconda/cloud/linux-64/repodata.json (Caused by ConnectTimeoutError(<requests.packages.urllib3.connecton.VerifiedHTTPSConnection object at 0x7fb6d340dcc0>, 'Connection to nanomirrors.tuna.tsinghua.edu.cn timed out. (connct timeout=9.15)'))",),)

解决方法:

#首先先添加清华的镜像源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes

#如果无法解决,则删除channels配置文件中部分内容

#具体操作如下:
#1、快速创建channels配置文件的备份(保险起见)
cp ~/.condarc{ 
   ,.bak}

#查看配置文件的内容
cat ~/.condarc.bak 
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  - defaults
  - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
  - https://nanomirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/conda
  - bioconda
  - r
  - conda-forge
show_channel_urls: true

#2、删除部分内容
## 主要是删除此行: - defaults
#修改后配置文件的内容如下:
vim ~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
show_channel_urls: true

ProxyError: Conda cannot proceed due to an error in your proxy configuration

执行代码:conda install -c conda-forge r-seurat=4.0.4

当使用 conda install 安装软件时出现如下报错:

ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any '.netrc' file in your home directory,
any environment variables ending in '_PROXY', and any other system-wide proxy
configuration settings.

解决方案

$ echo $http_proxy
http://10.53.15.246:3128
$ echo $https_proxy
http://10.53.15.246:3128

然后修改配置文件 ~/.condarc

修改后配置文件的内容如下:

$ cat ~/.condarc
channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
  - r
  - conda-forge
show_channel_urls: true
proxy_servers:
  http: http://10.53.15.246:3128
  https: http://10.53.15.246:3128
ssl_verify: false
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/187241.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • qtcpsocket用法_qtcpsocket发送16进制数据

    qtcpsocket用法_qtcpsocket发送16进制数据在QTcpSocket中的tcp通信,发送数据,接收数据都是QTcpSocket套接字的功能,包括server端,QTcpServer的功能仅仅是作为一个服务器的存在;客户端:classClient:publicQWidget{Q_OBJECTpublic:explicitClient(QWidget*parent=0);~Cl…

    2022年9月10日
    0
  • Zuul网关_vue动态路由和静态路由的区别

    Zuul网关_vue动态路由和静态路由的区别1.微服务架构所面临的问题?1)针对某个功能,客户端在微服务架构的情况下需要请求多个模块接口2)针对于身份认证、日志、流量控制等公共模块每个微服务都需要做一遍,不利于业务与非业务的拆分针对于这些问题,Zuul可完美解决,我们可用Zuul做:1)客户端只需要知道网关而不需要知道具体模块的地址,所有服务由网关对外提供2)身份认证类…

    2022年8月15日
    2
  • matlab自带的插值函数interp1的四种插值方法

    matlab自带的插值函数interp1的四种插值方法分段线性插值,临近插值,球面插值,三次多项式插值!!

    2022年6月14日
    36
  • matlab语法 axis on,matlabaxis

    matlab语法 axis on,matlabaxis编程语言中文网今天精心准备的是《matlabaxis》,下面是详解!Matlab里axis这个函数怎么用,举个例子!axis函数可以用于操作普通的坐标属性(轴的缩放和外观)。比如:axis([xminxmaxyminymax]):可以设置当前坐标轴x轴和y轴的限制范围axis([xminxmaxyminymaxzminzmaxcmincmax])可以设置x,y…

    2022年6月13日
    35
  • jboss安装与配置_JbusDriver

    jboss安装与配置_JbusDriver1,下载jboss6.0产品jboss官网下载地址:http://www.jboss.org/jbossas/downloads/这里下载了jboss-as-distribution-6.0.0.Final.zip下载完成后,将其解压缩后即可完成安装,解压缩后将其放置到一个不带空格的目录(避免不必要的麻烦),同时在“环境变量设置”中设置名为JBOSS_HOME的环境变量,值为J…

    2022年9月28日
    0
  • linux之epoll

    1.epoll简介epoll 是Linux内核中的一种可扩展IO事件处理机制,最早在Linux2.5.44内核中引入,可被用于代替POSIXselect和poll系统调用,并

    2021年12月28日
    39

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号