安装numpy:conda install nampy==1.16 时报错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.

1、错误截图

2、方法一

原因是conda源加入了不知名的URL,现在不能使用了(或者废弃)

# 重置源配置
conda config --remove-key channels
# 重新添加清华源
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --set show_channel_urls yes
# 查看效果
cat ~/.condarc
(TF117) PS C:\Users\Dell> cat ~/.condarc                                                                                ssl_verify: true
show_channel_urls: true
report_errors: true
channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults

失败!!

3、方法二

# 更新conda
conda update -n base conda
CondaError: Downloaded bytes did not match Content-Length
url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/llvmlite-0.35.0-py37h34b8924_4.conda
target_path: D:\Anaconda3\pkgs\llvmlite-0.35.0-py37h34b8924_4.conda
Content-Length: 12989490
downloaded bytes: 5160624 CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/imagecodecs-2021.1.11-py37h5da4933_1.conda>
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. CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/matplotlib-base-3.3.4-py37h49ac443_0.conda>
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. CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/pandas-1.2.3-py37hf11a4ad_0.conda>
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.
conda update -all

更新也出错!!

Collecting package metadata (current_repodata.json): done
Solving environment: done # All requested packages already installed.
已经安装完毕了

从报错的情况看可能下载的太慢,之前清华源换了还是有问题。

在这里还原到默认状态。

 conda config --remove-key channels

又按照报错信息手动删除了一些文件

警告conda.gateways.disk.delete:unlink_or_rename_to_trash(140):无法删除或重命名D:\ Anaconda3 \ pkgs \ qt-5.6.2-vc14_6.tar.bz2。 请手动删除此文件(您可能需要重新启动才能释放文件句柄)

警告conda.gateways.disk.delete:unlink_or_rename_to_trash(140):无法删除或重命名D:\ Anaconda3 \ pkgs \ qt-5.6.2-vc14_6 \ Library \ plugins \ sqldrivers \ qsqlite.dll。 请手动删除此文件(您可能需要重新启动才能释放文件句柄)

再升级一下

# conda
conda update conda
# anaconda(升级anaconda前需要先升级conda)
conda update anaconda
# anaconda-navigator
conda update anaconda-navigator
# spyder
conda update spyder
# 所有包
conda update --all
# 尽量避免使用conda update --all命令,可能会出现部分包降级的问题

安装第一个命令过程后,我出现了一个错误:PackageNotInstalledError: Package is not installed in prefix,这个时候不用慌,输入conda的命令基本上都是报错,把终端关掉重新开启就解决了。原文链接:https://blog.csdn.net/sv2008337/article/details/80235482

试一下。

上面的都行了,OK!

# 修改频道
conda config --add channels conda-forge
conda config --set channel_priority flexible

你以为这样就解决了么?

不!!这行故障还是存在。

先到这里,这就是我一下午找遍全网也没解决问题的脑残操作,希望观众老爷看了之后能够解决你的问题。

安装numpy:conda install nampy==1.16 时报错An HTTP error occurred when trying to retrieve this URL.的更多相关文章

  1. MyEclipse for Spring启动时报错"An internal error occurred during: 'Updating indexes'.Java heap space"的解决办法

    问题 MyEclipse for Spring在启动时,报如下错误:An internal error occurred during: 'Updating indexes'.Java heap sp ...

  2. 添加数据时报错:An error occurred while updating the entries. See the inner exception for detail。

    场景:前几天在项目开发时,有个bug经常出现,今天花了一整天,终于把它解决了.记录一下解决流程. 解决方法: 主要报错的地方在添加的部分: 1 foreach (var requestProperty ...

  3. anaconda在本地安装软件conda install

    安装完anaconda后,想在mac下安装pytorch,但是在用官网提供的安装方法一直安装不上pytorch和torchvision,估计是被墙了 conda install pytorch tor ...

  4. Linux下安装mysql时报错:FATAL ERROR: please install the following Perl modules before executing ./scripts/mysql_install_db:Data::Dumper

    如题,安装mysql过程中,执行scripts/mysql_install_db --user=mysql命令时报错: FATAL ERROR: please install the followin ...

  5. 修改 docker image 安装目录 (解决加载大image时报错:"no space left on device")

    修改 docker image 安装目录 (解决加载大image时报错:"no space left on device" ) 基于Ubuntu16.04 docker版本: 17 ...

  6. 解决用anaconda安装scrapy后,在使用scrapy时报错

    python版本为3.7 因为用anaconda安装scrapy非常方便,会自动下载所依赖的包, 所以就使用anaconda安装scrapy, 非常舒服,安装很成功 conda install scr ...

  7. python安装numpy、scipy、gensim以及报错unable to import 'smart_open.gcs', disabling that module处理

    首先,安装gensim库,必须先安装numpy+mkl和scipy 安装顺序是依次安装numpy+kml.scipy.gensim,根据自己Python下载的版本进行下载 如果你的库里面有numpy. ...

  8. 安装tcpreplay时报错:configure: error: libdnet not found

    安装tcpreplay时报错configure: error: libdnet not found 解决方法: 下载包libdnet-1.8.tar.gz并安装,依次执行: ./configure m ...

  9. 编译安装redis 3.2.9 make test 时报错

    默认监听端口:6379(可以创建多个端口的配置文件) 源码安装: $ yum install tcl $ wget http://download.redis.io/releases/redis-3. ...

  10. mysql初始化时报错bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory的处理

    问题描述: 今天新安装了一个linux虚拟机,然后安装mysql 5.7.21,在进行初始化的时候,报错 bin/mysqld: error : cannot open shared object f ...

随机推荐

  1. nginx 均衡负载

    前言 在此只介绍一些nginx的简单的负载均衡. 正文 在这篇之前,请看我的nginx反向代理这一篇,是接着上面的例子写的. 我在上个例子中,分别是两个a.html 和 b.html 现在我把他们的名 ...

  2. 纯CSS实现带小三角提示框

    要实现在页面上点击指定元素时,弹出一个信息提示框.在前面的文章中,我们已经简单介绍了如何使用纯 CSS 创建一个三角形.本文在此基础上,记录如何使用 CSS 创建带三角形的提示框. 实现的原理是创建一 ...

  3. Springmvc来做甘特图的显示控制。

    springmvc没有Springboot好用:所以就用了ajax通信来获取数据,这其中有不少坑,我来带大家踩一踩. 1.在控制层中,接口不能直接返回Json格式. 我的解决方法可以使通过map,或者 ...

  4. 使用纯c#在本地部署多模态模型,让本地模型也可以理解图像

    之前曾经分享过纯c#运行开源本地大模型Mixtral-8x7B 当时使用的是llamasharp这个库和Mixtral的模型在本地部署和推理,前段时间我看到llamasharp更新到了0.11.1版本 ...

  5. Java集成系列:高效构建自定义插件

    前言 随着软件开发的快速发展和需求的不断增长,开发人员面临着更多的压力和挑战.传统的开发方法需要花费大量的时间和精力,而低代码开发平台的出现为开发人员提供了一种更加高效.快速的开发方式.今天小编就以构 ...

  6. 使用Docker搭建MongoDB 5.0版本副本集集群

    1.mongodb集群 首先我们需要了解mongodb的集群模式,mongodb安装分为单机安装和集群安装.集群安装分为:主从复制(Master-Slaver)集群.副本集(Replica Set)集 ...

  7. 我在阿里巴巴做 Serverless 云研发平台

    简介: Serverless 云研发平台经过这半年多的蜕变,已经从简单的解决工程链路的平台演进成一个面向研发.上线.运维的全生命周期研发平台,后续要解决的命题会集中在用户低门槛上. 作者 | 林昱(苏 ...

  8. [FAQ] JS 实现暂停(睡眠) Sleep 与 倒计时 ?

    想要暂停/睡眠一秒,可以参考使用以下方式: async () => { await (new Promise((resolve) => setTimeout(resolve, 1000)) ...

  9. dotnet 读 WPF 源代码笔记 GlyphRun 的 DeviceFontName 的功能是什么

    在 WPF 里面的 GlyphRun 里,有一个令人迷惑的 DeviceFontName 属性,似乎给这个属性传入什么值,结果都不会有变更.通过阅读源代码,可以了解到,这是一个没什么用途的属性.本文将 ...

  10. dotnet 使用 NamedPipeClientStream 连接一个不存在管道服务名将不断空跑 CPU 资源

    本文记录一个开发和代码审查过程中,需要关注的细节.在 dotnet 里,在 .NET 6 和以下版本,包括 .NET Framework 版本,使用 NamedPipeClientStream 进行连 ...