conda创建新环境错误RuntimeError: didn‘t find info component in /home/hwits/anaconda3/pkgs/conda-4.8.2-py37_

准备创建一个新的python环境:

conda create -n torch171 python=3.7.4

结果报错:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
  current version: 4.7.12
  latest version: 4.9.2

Please update conda by running

    $ conda update -n base -c defaults conda



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

    Traceback (most recent call last):
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 301, in _make_single_record
        repodata_record = read_repodata_json(extracted_package_dir)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/gateways/disk/read.py", line 130, in read_repodata_json
        with open(join(extracted_package_directory, 'info', 'repodata_record.json')) as fi:
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/common/compat.py", line 177, in open
        closefd=closefd)
    FileNotFoundError: [Errno 2] No such file or directory: '/home/hwits/anaconda3/pkgs/conda-4.8.2-py37_0/info/repodata_record.json'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 318, in _make_single_record
        raw_json_record = read_index_json(extracted_package_dir)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/gateways/disk/read.py", line 116, in read_index_json
        with open(join(extracted_package_directory, 'info', 'index.json')) as fi:
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/common/compat.py", line 177, in open
        closefd=closefd)
    FileNotFoundError: [Errno 2] No such file or directory: '/home/hwits/anaconda3/pkgs/conda-4.8.2-py37_0/info/index.json'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/exceptions.py", line 1074, in __call__
        return func(*args, **kwargs)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/cli/main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
        exit_code = getattr(module, func_name)(args, parser)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/cli/main_create.py", line 37, in execute
        install(args, parser, 'create')
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/cli/install.py", line 317, in install
        handle_txn(unlink_link_transaction, prefix, args, newenv)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/cli/install.py", line 333, in handle_txn
        unlink_link_transaction.print_transaction_summary()
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/link.py", line 917, in print_transaction_summary
        legacy_action_groups = self._make_legacy_action_groups()
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/link.py", line 901, in _make_legacy_action_groups
        self._pfe.prepare()
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/common/io.py", line 88, in decorated
        return f(*args, **kwds)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 612, in prepare
        for prec in self.link_precs)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 612, in <genexpr>
        for prec in self.link_precs)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 503, in make_actions_for_record
        ), None)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 500, in <genexpr>
        pcrec for pcrec in concat(PackageCacheData(pkgs_dir).query(pref_or_spec)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 501, in <genexpr>
        for pkgs_dir in context.pkgs_dirs)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 130, in query
        return (pcrec for pcrec in itervalues(self._package_cache_records) if pcrec == param)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 244, in _package_cache_records
        self.load()
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 96, in load
        package_cache_record = self._make_single_record(base_name)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/core/package_cache_data.py", line 340, in _make_single_record
        extract_tarball(package_tarball_full_path, extracted_package_dir)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda/gateways/disk/create.py", line 219, in extract_tarball
        conda_package_handling.api.extract(tarball_full_path, dest_dir=destination_directory)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda_package_handling/api.py", line 58, in extract
        SUPPORTED_EXTENSIONS[ext].extract(fn, dest_dir, components=components)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda_package_handling/conda_fmt.py", line 59, in extract
        _extract_component(fn, file_id, component, dest_dir)
      File "/home/hwits/anaconda3/lib/python3.7/site-packages/conda_package_handling/conda_fmt.py", line 38, in _extract_component
        .format(component_name, fn))
    RuntimeError: didn't find info component in /home/hwits/anaconda3/pkgs/conda-4.8.2-py37_0.conda

`$ /home/hwits/anaconda3/bin/conda create -n torch171 python=3.7.4`

  environment variables:
                 CIO_TEST=<not set>
                CLASSPATH=.:/usr/lib/jvm/jdk-14.0.2/lib:/usr/lib/jvm/jdk-14.0.2/jre/lib
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=/home/hwits/anaconda3/bin/conda
             CONDA_PREFIX=/home/hwits/anaconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=/home/hwits/anaconda3/bin/python
               CONDA_ROOT=/home/hwits/anaconda3
              CONDA_SHLVL=1
            DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path
          LD_LIBRARY_PATH=/usr/local/cuda-10.0/lib64:/opt/intel/openvino_2019.3.334/opencv/lib:/
                          opt/intel/opencl:/opt/intel/openvino_2019.3.334/deployment_tools/infer
                          ence_engine/external/hddl/lib:/opt/intel/openvino_2019.3.334/deploymen
                          t_tools/inference_engine/external/gna/lib:/opt/intel/openvino_2019.3.3
                          34/deployment_tools/inference_engine/external/mkltiny_lnx/lib:/opt/int
                          el/openvino_2019.3.334/deployment_tools/inference_engine/external/tbb/
                          lib:/opt/intel/openvino_2019.3.334/deployment_tools/inference_engine/l
                          ib/intel64:/opt/intel/openvino_2019.3.334/openvx/lib:
       LIBVA_DRIVERS_PATH=/opt/intel/mediasdk/lib64
           MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path
                     PATH=/home/hwits/anaconda3/bin:/usr/lib/jvm/jdk-14.0.2/bin:/home/hwits/anac
                          onda3/bin:/home/hwits/anaconda3/condabin:/home/hwits/bin:/home/hwits/.
                          local/bin:/opt/intel/openvino_2019.3.334/deployment_tools/model_optimi
                          zer:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/
                          games:/usr/local/games:/snap/bin:/egova_apps/java/jdk1.8.0_181/bin:/eg
                          ova_apps/java/jdk1.8.0_181/bin:/usr/lib/android/android-sdk-
                          linux/tools:/usr/lib/android/android-sdk-linux/platform-
                          tools:/usr/lib/android/android-ndk-r20b
               PYTHONPATH=/home/hwits/Documents/caffe/python:/opt/intel/openvino_2019.3.334/pyth
                          on/python3.5:/opt/intel/openvino_2019.3.334/python/python3:/opt/intel/
                          openvino_2019.3.334/deployment_tools/open_model_zoo/tools/accuracy_che
                          cker:/opt/intel/openvino_2019.3.334/deployment_tools/model_optimizer::
                          /home/hwits/TFModels/models/research/slim
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>
            XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
         XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0

     active environment : base
    active env location : /home/hwits/anaconda3
            shell level : 1
       user config file : /home/hwits/.condarc
 populated config files : /home/hwits/.condarc
          conda version : 4.7.12
    conda-build version : 3.18.9
         python version : 3.7.4.final.0
       virtual packages : __cuda=10.2
       base environment : /home/hwits/anaconda3  (writable)
           channel URLs : 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/hwits/anaconda3/pkgs
                          /home/hwits/.conda/pkgs
       envs directories : /home/hwits/anaconda3/envs
                          /home/hwits/.conda/envs
               platform : linux-64
             user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Linux/4.15.0-136-generic ubuntu/16.04.6 glibc/2.23
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

Upload successful.

报错显示RuntimeError: didn't find info component in /home/hwits/anaconda3/pkgs/conda-4.8.2-py37_0.conda,

看提示我的版本是:current version: 4.7.12

最新版本是latest version: 4.9.2

并且提示我要更新conda update -n base -c defaults conda,

但是报错的是conda-4.8.2-py37_0.conda,貌似我也不需要这个版本,

于是尝试删除这个文件:

rm /home/hwits/anaconda3/pkgs/conda-4.8.2-py37_0.conda

之前再次安装新环境一切正常。

Guess you like

Origin blog.csdn.net/IEEE_FELLOW/article/details/115111513