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


相关推荐

  • HTML解析之DOMContentLoaded和onload

    HTML解析之DOMContentLoaded和onload说在前面在很久很久以前,我在封装自己的JQuery库时就使用过DOMContentLoaded,觉得这个知识点看看别的文章就行了,不过现在我想把它记下来。JS代码与body标签的位置关系一个HTML初学时会遇到的问题,一个html页面中js代码应该放到哪里?<!–如果script标签在body前面–><head>…&lt…

    2025年5月28日
    4
  • Linux教程+操作系统教程

    Linux教程+操作系统教程.Linux入门教程http://c.biancheng.net/cpp/linux/基础教程Linux简介Linux文件管理Linux目录Linux文件权限和访问模式Linux环境变量Linux打印文件和发送邮件Linux管道和过滤器Linux进程管理Linux网络通信工具vi编辑器Linux文件系统Linux文件存储结构Linux用户管理Linux系统性能分析Linux系统日志及…

    2022年10月13日
    1
  • 探秘X86架构CPU流水线[通俗易懂]

    探秘X86架构CPU流水线[通俗易懂]http://ee.ofweek.com/2013-07/ART-11001-2805-28704745.html导读:CPU是如何工作的呢?一条指令执行需要多长时间?当我们讨论某个新款处理器拥有12级流水线还是18级流水线,甚至是更深的31级流水线时,这到些都意味着什么呢?作为程序员,CPU在我们的工作中扮演了核心角色,因此了解处理器内部的工作方式对程序员来说不无裨益。  CPU…

    2022年8月20日
    18
  • int* a和int *a_int和char的区别

    int* a和int *a_int和char的区别工作中经常碰到int8_t、int16_t、int32_t、int64_t、uint8_t、size_t、ssize_t等数据类型,所以有必要对此进行梳理。int_t同类int_t为一个结构的标注,可以理解为type/typedef的缩写,表示它是通过typedef定义的,而不是一种新的数据类型。因为跨平台,不同的平台会有不同的字长,所以利用预编译和typedef可以最有效的维护代码。…

    2022年9月20日
    2
  • linux安装pycharm后找不到了_pycharmlinux安装

    linux安装pycharm后找不到了_pycharmlinux安装在linux中安装pycharm很简单,解压后直接启动.1.先去官网下载安装包2.解压压缩包到自己指定的目录.第三方软件一般安装到/opt目录3.启动,可以直接运行的.进入到pycharm解压后的目录的bin目录下.pycharm.sh就是启动脚本,直接可以启动,但这样每次都要指定路径启动.shpycharm.sh启动pycharm将会阻塞一个终端,关闭终端pycharm也将随之关闭.4.创建一下快捷启动命令,指定一个别名.1.进入当前用户主目录.bashrc

    2022年10月18日
    2
  • linux系统dpkg命令[通俗易懂]

    linux系统dpkg命令[通俗易懂]dpkg是Debianpackage的简写,为”Debian“操作系统专门开发的套件管理系统,用于软件的安装,更新和移除。阅读目录安装软件 列出与该包先关联的文件 显示包的版本 移除软件(保留配置) 移除软件(不保留配置) 查找包的详细信息 列出deb包的内容安装软件命令:dpkg-i<.debfilename>实例:dpkg-i~/Download/mozybackup_i386.debmozybackup_i386.deb是手动下…

    2022年5月11日
    48

发表回复

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

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