conda create虚拟环境报错

这篇具有很好参考价值的文章主要介绍了conda create虚拟环境报错。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

报错内容:

Collecting package metadata (current_repodata.json): failed

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 719, in fetch_repodata_remote_request
        resp.raise_for_status()
      File "/usr/lib/python3/dist-packages/requests/models.py", line 940, in raise_for_status
        raise HTTPError(http_error_msg, response=self)
    requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch/current_repodata.json
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1125, in __call__
        return func(*args, **kwargs)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 86, in main_subshell
        exit_code = do_call(args, p)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 93, in do_call
        return getattr(module, func_name)(args, parser)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/notices/core.py", line 72, in wrapper
        return_value = func(*args, **kwargs)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/cli/main_create.py", line 43, in execute
        install(args, parser, 'create')
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/cli/install.py", line 260, in install
        should_retry_solve=(_should_retry_unfrozen or repodata_fn != repodata_fns[-1]),
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 155, in solve_for_transaction
        should_retry_solve)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 196, in solve_for_diff
        force_remove, should_retry_solve)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 300, in solve_final_state
        ssc = self._collect_all_metadata(ssc)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 86, in decorated
        return f(*args, **kwds)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 463, in _collect_all_metadata
        index, r = self._prepare(prepared_specs)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/solve.py", line 1058, in _prepare
        self.subdirs, prepared_specs, self._repodata_fn)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/index.py", line 298, in get_reduced_index
        repodata_fn=repodata_fn)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 152, in query_all
        result = tuple(concat(executor.map(subdir_query, channel_urls)))
      File "/home/tuolong/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 586, in result_iterator
        yield fs.pop().result()
      File "/home/tuolong/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 425, in result
        return self.__get_result()
      File "/home/tuolong/anaconda3/lib/python3.7/concurrent/futures/_base.py", line 384, in __get_result
        raise self._exception
      File "/home/tuolong/anaconda3/lib/python3.7/concurrent/futures/thread.py", line 57, in run
        result = self.fn(*self.args, **self.kwargs)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 145, in <lambda>
        package_ref_or_match_spec))
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 157, in query
        self.load()
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 222, in load
        _internal_state = self._load()
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 391, in _load
        repodata_fn=self.repodata_fn)
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/core/subdir_data.py", line 778, in fetch_repodata_remote_request
        response=e.response,
      File "/home/tuolong/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 460, in __init__
        body = response.json()
      File "/usr/lib/python3/dist-packages/requests/models.py", line 897, in json
        return complexjson.loads(self.text, **kwargs)
      File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loads
        return _default_decoder.decode(s)
      File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
        obj, end = self.raw_decode(s)
      File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
        return self.scan_once(s, idx=_w(s, idx).end())
      File "/usr/lib/python3/dist-packages/simplejson/scanner.py", line 79, in scan_once
        return _scan_once(string, idx)
      File "/usr/lib/python3/dist-packages/simplejson/scanner.py", line 70, in _scan_once
        raise JSONDecodeError(errmsg, string, idx)
    simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

`$ /home/tuolong/anaconda3/bin/conda create -n yolov7 python=3.7`

  environment variables:
                 CIO_TEST=<not set>
        CMAKE_PREFIX_PATH=/opt/ros/noetic
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/home/tuolong/anaconda3/bin/conda
             CONDA_PREFIX=/home/tuolong/anaconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/home/tuolong/anaconda3/bin/python
               CONDA_ROOT=/home/tuolong/anaconda3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
          LD_LIBRARY_PATH=/opt/ros/noetic/lib:/home/tuolong/freenect2/lib:/usr/local/cuda-11.2/l
                          ib64
                     PATH=/home/tuolong/anaconda3/bin:/home/tuolong/anaconda3/bin:/home/tuolong/
                          anaconda3/condabin:/opt/ros/noetic/bin:/home/tuolong/freenect2/lib/cma
                          ke/freenect2:/usr/local/cuda-11.2/bin:/home/tuolong/anaconda3/bin:/hom
                          e/tuolong/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
                          :/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
          PKG_CONFIG_PATH=/opt/ros/noetic/lib/pkgconfig
               PYTHONPATH=/opt/ros/noetic/lib/python3/dist-packages:/usr/lib/python3/dist-
                          packages
       REQUESTS_CA_BUNDLE=<not set>
         ROS_PACKAGE_PATH=/opt/ros/noetic/share
            SSL_CERT_FILE=<not set>
               WINDOWPATH=2

     active environment : base
    active env location : /home/tuolong/anaconda3
            shell level : 1
       user config file : /home/tuolong/.condarc
 populated config files : /home/tuolong/.condarc
          conda version : 4.14.0
    conda-build version : not installed
         python version : 3.7.0.final.0
       virtual packages : __cuda=11.6=0
                          __linux=5.15.0=0
                          __glibc=2.31=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /home/tuolong/anaconda3  (writable)
      conda av data dir : /home/tuolong/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud//pytorch/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud//pytorch/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
                          https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /home/tuolong/anaconda3/pkgs
                          /home/tuolong/.conda/pkgs
       envs directories : /home/tuolong/anaconda3/envs
                          /home/tuolong/.conda/envs
               platform : linux-64
             user-agent : conda/4.14.0 requests/2.22.0 CPython/3.7.0 Linux/5.15.0-69-generic ubuntu/20.04.6 glibc/2.31
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An 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创建环境报错,环境/软件安装,conda,python,开发语言

解决办法

#step1: 删除原有镜像
(base) tuolong@tuolong-20:~/anaconda3/envs$ conda config --remove-key channels
#step2: 添加默认镜像
(base) tuolong@tuolong-20:~/anaconda3/envs$ conda config --append channels conda-forge --append channels bioconda --append channels defaults

参考:

CondaHTTPError: HTTP 404 NOT FOUND for url https://pypi.tuna.tsinghua.edu.cn/simple/ 错误文章来源地址https://www.toymoban.com/news/detail-744845.html

到了这里,关于conda create虚拟环境报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • conda创建python虚拟环境

            conda create -n py37 python=3.7     conda activate py37 Pycharm配置Anaconda环境_pycharm配置anaconda运行环境_奶茶可可的博客-CSDN博客 Pycharm学习过程中,每次在一个Pycharm窗口建立一个新的文件夹,都需要重新配置anaconda环境。由于本人是初学者,所以写一篇文章记录,如有错误,欢

    2024年02月10日
    浏览(48)
  • 下载好了annaconda,但是在创建一个新的Conda虚拟环境报错

    问题描述: ProxyError(MaxRetryError(“HTTPSConnectionPool(host=‘repo.anaconda.com’, port=443): Max retries exceeded with url: /pkgs/pro/win-64/repodata.json.bz2 (Caused by ProxyError(‘Cannot connect to proxy.’, NewConnectionError(‘urllib3.connection.VerifiedHTTPSConnection object at 0x000001D7D7A02208: Failed to establish a new connection: [W

    2024年04月14日
    浏览(45)
  • linux 安装下载conda并创建虚拟环境

    在window操作系统中下载anconda包,并通过scp传输到ubuntu操作系统 具体anconda包在如下界面: anconda包 目录 博主选择了最新的包: Anaconda3-2023.09-0-Linux-x86_64.sh 通过scp传输到ubuntu操作系统中: 并在ubuntu操作系统中执行如下命令: bash Anaconda3-2023.09-0-Linux-x86_64.sh 一直回车,直到出现

    2024年02月07日
    浏览(67)
  • Pycharm加载conda创建pytorch虚拟环境 & import torch报错问题解决

    PyTorch 最新安装教程(2021-07-27) 请参考: PyTorch 最新安装教程(2021-07-27) 如下图,打开 Pycharm 的 Settings ,修改 Project 的编译器。或者在创建新的 Project 时,选择 Anaconda 创建的 pytorch -- python

    2023年04月11日
    浏览(80)
  • 使用conda 创建虚拟环境,安装StableDiffusion WebUI

    在这里(https://docs.conda.io/en/latest/miniconda.html#windows-installers)下载安装文件 直接下载地址:https://repo.anaconda.com/miniconda/Miniconda3-py310_23.1.0-1-Windows-x86_64.exe 双击下载好的文件,下图红框的选项是安装以后清理文件省点磁盘空间(可以忽略)。 安装完成以后,在“开始”菜单里能

    2024年02月05日
    浏览(58)
  • 【新手向】conda安装及虚拟环境创建-ubuntu18.04

    官网下载conda官网下载 进入安装包所在目录,打开终端,输入下述安装指令 然后一路回车,直到出现让填yes和no的,如下图 输入yes后,会提示Anaconda的安装路径 (这里记录一下它的默认路径,按回车继续。) 等待安装完之后,会询问是否把anaconda的bin添加到用户的环境变量中

    2024年02月08日
    浏览(66)
  • pycharm使用conda创建的虚拟环境时找不到python.exe

    问题:在创建的虚拟环境中没有找到python.exe文件  解决方案:可能是condaba版本不一样,新版本选不到.exe文件 在anaconda软件的安装目录下选择condabin——conda.bat 然后加载环境,就可以选择创建的虚拟环境了  

    2024年02月04日
    浏览(49)
  • 一文掌握Conda/Mamba软件安装:虚拟环境、软件通道、加速solving、跨服务器迁移...

    生物信息学习的正确姿势 NGS系列文章包括NGS基础、在线绘图、转录组分析 (Nature重磅综述|关于RNA-seq你想知道的全在这)、ChIP-seq分析 (ChIP-seq基本分析流程)、单细胞测序分析 (重磅综述:三万字长文读懂单细胞RNA测序分析的最佳实践教程)、DNA甲基化分析、重测序分析、

    2024年02月03日
    浏览(112)
  • Linux用conda创建虚拟环境失败报错:Collecting package metadata (current_repodata.json): failed CondaHTTPError:

    pytorch虚拟环境 安装报错Linux,Collecting package metadata (current_repodata.json): failed CondaHTTPError: HTTP 000 CONNECTION FAILED for url https://conda.anaconda.org/bioconda/linux-64/current_repodata.json 遇到这种情况,各种尝试修改方法,重新安装pytorch都不起作用,更换清华源中科大源发现都没有办法,各种修

    2024年02月06日
    浏览(48)
  • 改变conda创建虚拟环境时候的默认路径和拷贝、删除、创建Conda虚拟环境

    conda环境默认安装在用户目录C:Usersusername.condaenvs下,如果选择默认路径,那么之后创建虚拟环境,也是安装在用户目录下。不想占用C盘空间,可以修改conda虚拟环境路径。 首先,找到用户目录下的.condarc文件(C:Usersusername)。 打开.condarc文件之后,添加或修改.condarc 中的

    2024年02月12日
    浏览(48)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包