安装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. DevEco Device Tool 3.0 Release带来5大能力升级,让智能设备开发更高效

    原文:https://mp.weixin.qq.com/s/QYlHUU05BDlzVxbfZbiKOg,点击链接查看更多技术内容. DevEco Device Tool是面向智能设备开发者提供的一站 ...

  2. 可视化学习:使用WebGL绘制圆形,实现色盘

    前言 在Canvas2D中实现圆形的绘制比较简单,只要调用arc指令就能在Canvas画布上绘制出一个圆形,类似的,在SVG中我们也只需要一个<circle>标签就能在页面上绘制一个圆形. ...

  3. maven 创建spring boot 需要的配置[一]

    前言 之所以写这个是因为现在官方推荐云创建: 所以标注一下maven project,创建后,如何导入spring boot. 正文 1.步骤一 在pom.xml 中加入: <dependenc ...

  4. python pickle模块,打包创建的对象,做持久化

    pickle提供了一个简单的持久化功能.可以将对象以文件的形式存放在磁盘上. pickle.dump(obj, file[, protocol]) 序列化对象,并将结果数据流写入到文件对象中.参数pr ...

  5. 国内chatGPT中文版网站有哪些?国内人工智能百花齐放!该如何选择?

    人工智能技术在中国的快速发展和普及,使得国内的人工智能产业日益壮大.在这些领域中,自然语言处理技术和聊天机器人已经取得了显著的进展.ChatGPT作为一种基于深度学习的聊天机器人模型,在国内得到了广泛 ...

  6. 力扣32(java)-最长有效括号(困难)

    题目: 给你一个只包含 '(' 和 ')' 的字符串,找出最长有效(格式正确且连续)括号子串的长度. 示例 1: 输入:s = "(()"输出:2解释:最长有效括号子串是 &quo ...

  7. Flink 助力美团数仓增量生产

    简介: 本文由美团研究员.实时计算负责人鞠大升分享,主要介绍 Flink 助力美团数仓增量生产的应用实践.内容包括:1.数仓增量生产:2.流式数据集成:3.流式数据处理:4.流式 OLAP 应用:5. ...

  8. dotnet 读 WPF 源代码笔记 为什么自定义的 UserControl 用户控件不能跨程序集继承

    从设计上,用户控件 UserControl 就不是一个合适用来多次继承的类型,更不要说进行跨程序集继承自定义的 UserControl 用户控件.对于大部分的用户控件来说,都是采用组合现有的控件来实现 ...

  9. dotnet C# 调用委托的 GetInvocationList 的对象分配

    本文也叫跟着 Stephen Toub 大佬学性能优化系列,这是我从 Stephen Toub 大佬给 WPF 框架做性能优化学到的知识,在热路径下,也就是频繁调用的模块,如果调用了委托的 GetIn ...

  10. 一个用Python将视频变为表情包的工具

    这是一个将视频转变为表情包的工具,现实生活中当我们看到一段搞笑的视频,我们可以将这段视频喂给这段程序,生成gif表情包,这样就可以用来舍友斗图了 1.一些限制 1.这个程序不能转化超过15秒以上的视频 ...