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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Harris角点学习[通俗易懂]

    Harris角点学习[通俗易懂]人们普遍认为角点是二维图像亮度变化剧烈的点或图像边缘曲线上曲率极大值的点。这些点在保留图像图形重要特征的同时,可以有效地减少信息的数据量,使其信息的含量很高,有效地提高了计算的速度,有利于图像的可靠匹配,使得实时处理成为可能。其在三维场景重建、运动估计、目标跟踪、目标识别、图像配准与匹配等计算机视觉领域起着非常重要的作用。  角点的检测主要有两类基于图像边缘的方法和基于图像灰度的方法。前者很

    2022年9月25日
    1
  • Yii2使用教程_yii2 rbac

    Yii2使用教程_yii2 rbachttps://www.cnblogs.com/chengbocd/p/6125533.htmlhttps://www.yiichina.com/doc/guide/2.0/start-giiht

    2022年8月1日
    2
  • OllyDBG 激活成功教程入门教程「建议收藏」

    OllyDBG 激活成功教程入门教程「建议收藏」原链接:https://www.cnblogs.com/ECJTUACM-873284962/p/7653285.html一、OllyDBG的安装与配置OllyDBG版的发布版本是个ZIP压缩包,只要解压到一个目录下,运行OllyDBG.exe就可以了。汉化版的发布版本是个RAR压缩包,同样只需解压到一个目录下运行OllyDBG.exe即可:OllyDBG中各个窗口的功能如上图。简单解释一下各个窗口的功能,更详细的内容可以参考TT小组翻译的中文帮助:反汇编窗口:显示被调试

    2022年9月21日
    0
  • js es6转es5在线_es6 array

    js es6转es5在线_es6 arrayes6尚未得到所有浏览器的全部支持将es6转化为es5必要。下面将利用babel转换js语法首先安装npminstall–save-dev@babel/core@babel/cli@babel/preset-env@babel/node在项目中创建babel.config.js文件(不可更改)在文件中写入如下代码constpresets=[ [“@babel/env”,{ targets:{ ie:”8″, edge:”17″, firef

    2022年9月24日
    0
  • 线性回归最小二乘法公式推导「建议收藏」

    线性回归最小二乘法公式推导「建议收藏」#1.符号表示首先我们将训练样本的**特征矩阵X**进行表示,其中N为样本个数,p为特征个数,每一行表示为每个样本,每一列表示特征的每个维度:

    2022年5月13日
    66
  • Nutch使用方法简介

    Nutch使用方法简介Nutch使用方法简介 目前Nutch采用Sehll的启动方式,如果您使用的是Windows系统,那么首先需要安装Cygwin。本文就以在Windows中为例,介绍Nutch的安装和使用方法。 (1)准备需要的软件列表   Cygwin    (下载地址:http://www.cygwin.com/setup.exe)   Jdk(1.4.2以上版本,

    2025年7月14日
    1

发表回复

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

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