无法在Windows 10上安装模块'conda_package_handling'

时间:2019-07-08 15:29:21

标签: conda

我刚刚在Windows 10上安装了conda,但是当我运行诸如“ conda info”之类的命令时,出现以下错误消息:

Traceback (most recent call last):
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\exceptions.py", line 1043, in __call__
    return func(*args, **kwargs)
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
    exit_code = do_call(args, p)
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\conda_argparse.py", line 80, in do_call
    module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\main_update.py", line 8, in <module>
    from .install import install
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\cli\install.py", line 19, in <module>
    from ..core.index import calculate_channel_urls, get_index
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\index.py", line 9, in <module>
    from .package_cache_data import PackageCacheData
  File "C:\Users\username\AppData\Local\Continuum\miniconda3\lib\site-packages\conda\core\package_cache_data.py", line 15, in <module>
    from conda_package_handling.api import InvalidArchiveError
ModuleNotFoundError: No module named 'conda_package_handling'

我已经尝试按照https://anaconda.org/anaconda/conda-package-handlinghttps://github.com/conda/conda/issues/8607的指示安装'conda_package_handling',但不会让我安装它-我收到相同的错误消息。我将不胜感激!

1 个答案:

答案 0 :(得分:0)

我在ubuntu 16中遇到了相同的错误,我如下解决了这个问题: 1. https://anaconda.org/conda-forge/conda-package-handling/files,根据您的系统下载正确的版本。我下载了conda-package-handling-1.3.11-py36_0.tar.bz2。 2.解压缩此文件,然后将'conda-package-handling-1.3.11-py36_0 / lib / python3.6 / site-packages / conda_package_handling'复制到'/home/emg/anaconda3/lib/python3.6/site-包裹” 3.也许可以修复此错误,但是当我运行'conda info'时,遇到了一个新错误,即“ ModuleNotFoundError:没有名为'libarchive'的模块” 4. https://pypi.org/project/libarchive/,运行“ sudo apt-get install libarchive-dev” 5.终于解决了