conda.exceptions.CondaRuntimeError:运行时错误:RuntimeError:生成器引发StopIteration

时间:2019-07-23 08:27:43

标签: exception runtime-error conda stopiteration

尝试此命令conda install -c anaconda protobuf时遇到此问题。

我在任何地方都找不到解决方法

(tensorflow1) C:\Users\Gagan Singh>conda install -c anaconda protobuf

Package plan for installation in environment c:\users\gagan singh\appdata\local\programs\python\python37\envs\tensorflow1:

The following NEW packages will be INSTALLED:

    certifi:        2019.6.16-py37_0     anaconda
    libprotobuf:    3.8.0-h7bd577a_0     anaconda
    pip:            19.1.1-py37_0        anaconda
    protobuf:       3.8.0-py37h33f27b4_0 anaconda
    python:         3.7.1-h33f27b4_4     anaconda
    setuptools:     41.0.1-py37_0        anaconda
    six:            1.12.0-py37_0        anaconda
    vc:             14.1-h21ff451_3      anaconda
    vs2015_runtime: 15.5.2-3             anaconda
    wheel:          0.33.4-py37_0        anaconda
    wincertstore:   0.2-py37_0           anaconda
    zlib:           1.2.11-h62dcd97_3    anaconda

Proceed ([y]/n)? y

Linking packages ...
An unexpected error has occurred.                                        |   0%
Please consider posting the following information to the
conda GitHub issue tracker at:

    https://github.com/conda/conda/issues

当前的conda安装:

           platform : win-64
      conda version : 4.2.7
   conda is private : False
  conda-env version : 4.2.7
conda-build version : not installed
     python version : 3.7.3.final.0
   requests version : 2.22.0
   root environment : c:\users\gagan singh\appdata\local\programs\python\python37  (writable)
default environment : c:\users\gagan singh\appdata\local\programs\python\python37\envs\tensorflow1
   envs directories : c:\users\gagan singh\appdata\local\programs\python\python37\envs
      package cache : c:\users\gagan singh\appdata\local\programs\python\python37\pkgs
       channel URLs : https://repo.continuum.io/pkgs/free/win-64/
                      https://repo.continuum.io/pkgs/free/noarch/
                      https://repo.continuum.io/pkgs/pro/win-64/
                      https://repo.continuum.io/pkgs/pro/noarch/
                      https://repo.continuum.io/pkgs/msys2/win-64/
                      https://repo.continuum.io/pkgs/msys2/noarch/
        config file : C:\Users\Gagan Singh\.condarc
       offline mode : False

$ c:\users\gagan singh\appdata\local\programs\python\python37\Scripts\conda install -c anaconda protobuf

Traceback (most recent call last):
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 201, in yield_lines
    with open(path) as fh:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\users\\gagan singh\\appdata\\local\\programs\\python\\python37\\pkgs\\vs2015_runtime-15.5.2-3\\info\\has_prefix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 209, in yield_lines
    raise StopIteration
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\cli\install.py", line 405, in install
    execute_actions(actions, index, verbose=not context.quiet)
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\plan.py", line 643, in execute_actions
    inst.execute_instructions(plan, index, verbose)
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\instructions.py", line 134, in execute_instructions
    cmd(state, arg)
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\instructions.py", line 78, in LINK_CMD
    link(state['prefix'], dist, lt, index=state['index'])
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 943, in link
    has_prefix_files = read_has_prefix(join(info_dir, 'has_prefix'))
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 248, in read_has_prefix
    return {pr.filepath: (pr.placeholder, pr.filemode) for pr in parsed_lines}
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 248, in <dictcomp>
    return {pr.filepath: (pr.placeholder, pr.filemode) for pr in parsed_lines}
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\install.py", line 247, in <genexpr>
    parsed_lines = (parse_line(line) for line in yield_lines(path))
RuntimeError: generator raised StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\exceptions.py", line 472, in conda_exception_handler
    return_value = func(*args, **kwargs)
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\cli\main.py", line 144, in _main
    exit_code = args.func(args, p)
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\cli\main_install.py", line 80, in execute
    install(args, parser, 'install')
  File "c:\users\gagan singh\appdata\local\programs\python\python37\lib\site-packages\conda\cli\install.py", line 420, in install
    raise CondaRuntimeError('RuntimeError: %s' % e)
conda.exceptions.CondaRuntimeError: Runtime error: RuntimeError: generator raised StopIteration

0 个答案:

没有答案