Conda Install Package Error[通俗易懂]

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


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

相关推荐

  • 这样规范写代码,同事直呼“666”

    点击上方“全栈程序员社区”,星标公众号 重磅干货,第一时间送达 来源:cnblogs.com/taojietaoge/p/11575376.html 一、MyBatis 不要为了多…

    2021年6月25日
  • RuntimeError: CUDA out of memory(已解决)[通俗易懂]

    今天用pytorch训练神经网络时,出现如下错误:RuntimeError:CUDAoutofmemory.Triedtoallocate144.00MiB(GPU0;2.00GiBtotalcapacity;1.29GiBalreadyallocated;79.00MiBfree;1.30GiBreservedintotalbyPyTorch)明明GPU0有2G容量,为什么只有79M可用?并且1.30G已经被PyTorch占用了。

    2022年4月10日
  • cvCircle and cvRectangle

    cvCircle and cvRectangleOpenCV中的cvCircle和cvRectangle函数void cvCircle(CvArr* img,CvPoint center,int radius,CvScalar color,int thickness=1,int lineType=8,int shift=0)Drawsacircle.Parameters:img –Image

    2022年7月24日
  • 创建xsync 脚本

    创建xsync 脚本1、安装rsync:yum-yinstallrsync2、创建xsync文件并进行编辑(最好放到配置过环境变量的目录下)输入命令:vi/usr/local/spark/spark-standalone/bin/xsync#!/bin/bash#1获取输入参数个数,如果没有参数,直接退出pcount=$#if[$pcount-lt1]thenechoNoEnoughArguement!exit;fi#2.遍历集群所有机器forh…

    2022年5月5日
  • CSS中的媒体类型media type[通俗易懂]

    CSS中的媒体类型media type[通俗易懂]madiatype作用首先要明白一点,我们平时写的HTML页面,可能在不同的媒体类型中显示,如可能显示在屏幕sreen上,也可能显示在纸质print上。那么当页面在不同的媒体类型中显示时,需要的样式可能是不一样的。比如,一般在screen上显示时,页面字体要大一些,在纸质媒体显示时,页面字体要小一些。那么如何告诉别人某个样式是适用于何种媒体类型的呢?这就要靠声明mediatype来实现了。

    2022年5月25日
  • 常用的JS页面跳转代码调用大全

    常用的JS页面跳转代码调用大全一、常规的JS页面跳转代码1、在原来的窗体中直接跳转用<scripttype="text/javascript">window.location.href=&q

    2022年7月1日

发表回复

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

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