conda.core.subdir_data.Response304ContentUnchanged && CondaHTTPError: HTTP 000 CONNECTION FAILED

问题情况

在复现RCAN的时候,用的python的代码是3.6的,而且pytorch要0.4.0,打算创个新的虚拟环境。

(base) C:\Users\HP>conda create -n pytorch0.4.0 python=3.6
Collecting package metadata: failed# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<Traceback (most recent call last):File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 218, in _loadmod_etag_headers.get('_mod'))File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 538, in fetch_repodata_remote_requestraise Response304ContentUnchanged()conda.core.subdir_data.Response304ContentUnchangedDuring handling of the above exception, another exception occurred:Traceback (most recent call last):File "C:\Users\HP\Anaconda3\lib\site-packages\conda\exceptions.py", line 1003, in __call__return func(*args, **kwargs)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _mainexit_code = do_call(args, p)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_callexit_code = getattr(module, func_name)(args, parser)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 37, in executeinstall(args, parser, 'create')File "C:\Users\HP\Anaconda3\lib\site-packages\conda\cli\install.py", line 257, in installforce_reinstall=context.force_reinstall or context.force,File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\solve.py", line 107, in solve_for_transactionforce_remove, force_reinstall)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\solve.py", line 145, in solve_for_diffforce_remove)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\solve.py", line 235, in solve_final_statessc = self._collect_all_metadata(ssc)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decoratedreturn f(*args, **kwds)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\solve.py", line 286, in _collect_all_metadataindex, r = self._prepare(prepared_specs)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\solve.py", line 688, in _prepareself.subdirs, prepared_specs)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\index.py", line 213, in get_reduced_indexnew_records = query_all(spec)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\index.py", line 176, in query_allreturn tuple(concat(future.result() for future in as_completed(futures)))File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 93, in queryself.load()File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 147, in load_internal_state = self._load()File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 224, in _loadmod_etag_headers.get('_mod'))File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 271, in _read_local_repdata_internal_state = self._process_raw_repodata_str(raw_repodata_str)File "C:\Users\HP\Anaconda3\lib\site-packages\conda\core\subdir_data.py", line 308, in _process_raw_repodata_strjson_obj = json.loads(raw_repodata_str or '{}')File "C:\Users\HP\Anaconda3\lib\json\__init__.py", line 348, in loadsreturn _default_decoder.decode(s)File "C:\Users\HP\Anaconda3\lib\json\decoder.py", line 337, in decodeobj, end = self.raw_decode(s, idx=_w(s, 0).end())File "C:\Users\HP\Anaconda3\lib\json\decoder.py", line 353, in raw_decodeobj, end = self.scan_once(s, idx)json.decoder.JSONDecodeError: Unterminated string starting at: line 228872 column 14 (char 6913854)`$ C:\Users\HP\Anaconda3\Scripts\conda-script.py create -n pytorch0.4.0 python=3.6`environment variables:CIO_TEST=<not set>CONDA_DEFAULT_ENV=baseCONDA_EXE=C:\Users\HP\Anaconda3\condabin\..\Scripts\conda.exeCONDA_EXES="C:\Users\HP\Anaconda3\condabin\..\Scripts\conda.exe"CONDA_PREFIX=C:\Users\HP\Anaconda3CONDA_PROMPT_MODIFIER=(base)CONDA_PYTHON_EXE=C:\Users\HP\Anaconda3\python.exeCONDA_ROOT=C:\Users\HP\Anaconda3CONDA_SHLVL=1CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1HOMEPATH=\Users\HPNVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\PATH=C:\Users\HP\Anaconda3;C:\Users\HP\Anaconda3\Library\mingw-w64\bin;C:\Users\HP\Anaconda3\Library\usr\bin;C:\Users\HP\Anaconda3\Library\bin;C:\Users\HP\Anaconda3\Scripts;C:\Users\HP\Anaconda3\bin;C:\Users\HP\Anaconda3;C:\Users\HP\Anaconda3\Library\mingw-w64\bin;C:\Users\HP\Anaconda3\Library\usr\bin;C:\Users\HP\Anaconda3\Library\bin;C:\Users\HP\Anaconda3\Scripts;C:\Users\HP\Anaconda3\bin;C:\Users\HP\Anaconda3\condabin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\ProgramFiles\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;D:\anaconda\soft;D:\anaconda\soft\Library\mingw-w64\bin;D:\anaconda\soft\Library\usr\bin;D:\anaconda\soft\Library\bin;D:\anaconda\soft\Scripts;D:\zfy\caffe-master\Build\x64\Release;E:\hzlprogram\并行编程\tbb2018_20170726oss\bin\intel64\vc14;C:\ProgramFiles\MATLAB\R2017b\bin\win64;C:\TDM-GCC-64\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32\wbem;C:\Program Files (x86)\NVIDIACorporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIANvDLISR;C:\Program Files\NVIDIA Corporation\Nsight Compute2019.4.0;C:\Program Files\NVIDIA GPU ComputingToolkit\CUDA\v10.1\bin;D:\hxb;D:\zfy\caffe-master\Build\x64\Release;E:\hzlprogram\并行编程\tbb2018_20170726oss\bin\intel64\vc14;C:\ProgramFiles\JetBrains\PyCharm Community Edition 2019.1.3\bin;.PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\ModulesREQUESTS_CA_BUNDLE=<not set>SSL_CERT_FILE=<not set>active environment : baseactive env location : C:\Users\HP\Anaconda3shell level : 1user config file : C:\Users\HP\.condarcpopulated config files : C:\Users\HP\.condarcconda version : 4.6.14conda-build version : 3.15.1python version : 3.7.0.final.0base environment : C:\Users\HP\Anaconda3  (writable)channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarchhttps://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarchpackage cache : C:\Users\HP\Anaconda3\pkgsC:\Users\HP\.conda\pkgsC:\Users\HP\AppData\Local\conda\conda\pkgsenvs directories : C:\Users\HP\Anaconda3\envsC:\Users\HP\.conda\envsC:\Users\HP\AppData\Local\conda\conda\envsplatform : win-64user-agent : conda/4.6.14 requests/2.19.1 CPython/3.7.0 Windows/10 Windows/10.0.16299administrator : Falsenetrc file : Noneoffline mode : FalseAn unexpected error has occurred. Conda has prepared the above report.If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?[y/N]: y
Upload successful.Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running$ conda config --set report_errors true

这个是通过下面解决的

conda clean -i

虽然说上面的问题不再显示,但是显示了别的问题,如下

新问题

(base) C:\Users\HP>conda create -n pytorch0.4.0 python=3.6
Collecting package metadata: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/repodata.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.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Read timed out."))

这个看上去就是说网络链接问题,或者说是源的问题,反正就是连接失败,重新输入语句很多次,也试了很多次换源等等操作,还是失败,给我整吐了。

新问题的解决方法

后来我就不打算创建新环境了,直接把旧的py3.6环境改一下,需要把pytorch1.2.1降到0.4.0。

(pytorch) C:\Users\HP>conda install pytorch=0.4.0
Collecting package metadata: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64/repodata.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.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Read timed out."))

还是和新问题一样。还以为是源的问题。

(pytorch) C:\Users\HP>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/(pytorch) C:\Users\HP>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/(pytorch) C:\Users\HP>conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/(pytorch) C:\Users\HP>conda config --set show_channel_urls yes(pytorch) C:\Users\HP>conda install pytorch=0.4.0
Collecting package metadata: failedCondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/repodata.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.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Read timed out."))

然后在查资料的时候,有人说pip比conda好用,随即尝试了一下。

(pytorch) C:\Users\HP>pip install pytorch=0.4.0
ERROR: Invalid requirement: 'pytorch=0.4.0'
= is not a valid operator. Did you mean == ?
WARNING: You are using pip version 19.1.1, however version 21.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.(pytorch) C:\Users\HP>pip install pytorch==0.4.0
Collecting pytorch==0.4.0ERROR: Could not find a version that satisfies the requirement pytorch==0.4.0 (from versions: 0.1.2, 1.0.2)
ERROR: No matching distribution found for pytorch==0.4.0
WARNING: You are using pip version 19.1.1, however version 21.1.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

(pip里pytorch叫torch,顺便把pip更新下, - -)

(pytorch) C:\Users\HP>python -m pip install --upgrade pip
Collecting pipDownloading https://files.pythonhosted.org/packages/cd/82/04e9aaf603fdbaecb4323b9e723f13c92c245f6ab2902195c53987848c78/pip-21.1.2-py3-none-any.whl (1.5MB)|████████████████████████████████| 1.6MB 504kB/s
Installing collected packages: pipFound existing installation: pip 19.1.1Uninstalling pip-19.1.1:Successfully uninstalled pip-19.1.1
Successfully installed pip-21.1.2

最后是把地址也直接放进去弄

(pytorch) C:\Users\HP>pip install torch==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
Looking in links: https://download.pytorch.org/whl/torch_stable.html
Collecting torch==0.4.0Downloading https://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-win_amd64.whl (607.0 MB)|████████████████████████████████| 607.0 MB 41 kB/s
Installing collected packages: torchAttempting uninstall: torchFound existing installation: torch 1.0.1Uninstalling torch-1.0.1:Successfully uninstalled torch-1.0.1
Successfully installed torch-0.4.0

小结

虽然程序跑起来,具体理论我不知道。

conda.core.subdir_data.Response304ContentUnchanged CondaHTTPError: HTTP 000 CONNECTION FAILED相关推荐

  1. Windows 下 Conda install 安装出现CondaHTTPError: HTTP 000 CONNECTION FAILED for url解决措施

    在使用Conda install 安装库的时候出现以下错误 原因是使用的是国外的镜像,切换至国内镜像就可以解决啦 在cmd 中输入下面命令 conda config --add channels ht ...

  2. Anaconda conda 不能用,一直Solving enviroment 最后报错CondaHTTPError: HTTP 000 CONNECTION FAILED for url

    在新电脑装Anaconda,创建新环境的时候,conda create -n tensorflow pip python=3.6 Solving enviroment \  一直转圈圈,不能完成.上网 ...

  3. 执行“conda create -n scrapyEnv python=3.6”,结果出现了“CondaHTTPError: HTTP 000 CONNECTION FAILED for url <h

    CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda ...

  4. Conda出现无法下载环境的现象,CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.co

    在这里收藏一篇文章,主要思想就是换镜像源太棒了嘿嘿解决大问题了,有需要的同学可以看看(26条消息) CondaHTTPError: HTTP 000 CONNECTION FAILED for url ...

  5. 解决:CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pk gs/main/win-64/c

    解决上一篇未解决的问题:上一篇博客 https://blog.csdn.net/ckc_csdn/article/details/110824643 问题 解决办法 其他问题的解决 一.问题 Cond ...

  6. 安装tensorflow报错---CondaHTTPError: HTTP 000 CONNECTION FAILED for url

    安装tensorflow报CondaHTTPError: HTTP 000 CONNECTION FAILED for url错,有两种方案: 1.tensorflow下载源太慢,超出链接时长,解决办 ...

  7. CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirror.tuna.tsinghua.edu.cn/anaconda/pkg

    使用conda创建tensorflow环境时(conda create -n tensorflow python=3.6)出现:CondaHTTPError: HTTP 000 CONNECTION ...

  8. 解决:CondaHTTPError: HTTP 000 CONNECTION FAILED for url

    利用miniconda安装python3.9的环境时,报错如下: 本地可以打开报错的网站,即 https://repo.anaconda.com/pkgs/main/win-64/current_re ...

  9. 解决CondaHTTPError:HTTP 000 CONNECTION FAILED for url<https://mirrors.tuna.tsinghua.edu.cn/anaconda***

    解决CondaHTTPError:HTTP 000 xxx 前言 1.解决方法 方法一:直接通过cmd修改 方法二:通过.condarc文件进行更改 3.一些读者反馈的方法bug解决方案与注意事项 前 ...

最新文章

  1. 一张“黑洞”需要拍两年?有了它或许就不会让大家等那么久了
  2. 【ASP.NET Web API教程】5.5 ASP.NET Web API中的HTTP Cookie
  3. 介绍一下python有趣的库-tqdm
  4. NVIDIA各个领域芯片现阶段的性能和适应范围
  5. 如何在SAP云平台上创建Redis实例
  6. 较好的个人网址(关于编程)
  7. Github | 如何用神经网络识别系外行星?
  8. 单链表的创建、测长、打印、插入、删除、排序及逆置
  9. 第九章 限制性图谱和正则表达式
  10. 如何解决Configuration system failed to initialize
  11. Python爬虫学习记录(0)——Python 爬虫抓站 记录(虾米,百度,豆瓣,新浪微博)
  12. mysql数据库两表建立联系_在MySQL数据库建立多对多的数据表关系
  13. 从tushare pro获取上证指数内成分股权重排序分出等级
  14. 计算两个日期之间,相差多少天C语言详解
  15. mysql,php,redis,jq小记
  16. Excel VBA 外贸邮件群发
  17. unity Font字体替换
  18. 韦东山嵌入式第一期学习笔记DAY_4——8_3编写第1个程序点亮LED
  19. 1034: 夏季促销 Python
  20. 如何选择适合你的兴趣爱好(五十一),喝茶

热门文章

  1. stm32F407 连接 对射式红外对管 样例
  2. Johnson法则证明
  3. Microsoft CMT 系统
  4. 记录一些之前学的APPUI设计知识
  5. html+ajax登陆,jQuery+Ajax模拟用户登录功能的实现代码
  6. 时空同步图卷积网络:时空网络数据预测的新框架
  7. ArcGIS版本高级应用 数据归档(历史归档 存档数据)
  8. 改进YOLOv5, YOLOv7系列:1.YOLO超全注意力机制汇总 | S2A, SE,SimAM, SKA,ShA, SOCA, CA, CBAM, CrissCrossA, NAM, GAM等
  9. 柯西导数与鲁宾逊导数之比较
  10. Linux服务器下挂载存储