49033


# 環境

  * Python 3.6.6 :: Anaconda, Inc.
  * pip 18.0
  * Windows10
  * conda 4.5.11

# 問題

先日`conda update --all`でパッケージをアップデートしたら、`pip install`で次のエラーが発生しました。

[code]

    >python -m pip install docutils
    Exception:
    Traceback (most recent call last):
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2869, in _dep_map
        return self.__dep_map
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2663, in __getattr__
        raise AttributeError(attr)
    AttributeError: _DistInfoDistribution__dep_map
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\packaging\requirements.py", line 93, in __init__
        req = REQUIREMENT.parseString(requirement_string)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 1632, in parseString
        raise exc
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 1622, in parseString
        loc, tokens = self._parse( instring, 0 )
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 1379, in _parseNoCache
        loc,tokens = self.parseImpl( instring, preloc, doActions )
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 3395, in parseImpl
        loc, exprtokens = e._parse( instring, loc, doActions )
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 1383, in _parseNoCache
        loc,tokens = self.parseImpl( instring, preloc, doActions )
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pyparsing.py", line 3183, in parseImpl
        raise ParseException(instring, loc, self.errmsg, self)
    pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 33), (line:1, col:34)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2949, in __init__
        super(Requirement, self).__init__(requirement_string)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\packaging\requirements.py", line 97, in __init__
        requirement_string[e.loc:e.loc + 8]))
    pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'; extra '"
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_internal\basecommand.py", line 141, in main
        status = self.run(options, args)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_internal\commands\install.py", line 330, in run
        self._warn_about_conflicts(to_install)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_internal\commands\install.py", line 456, in _warn_about_conflicts
        package_set, _dep_info = check_install_conflicts(to_install)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_internal\operations\check.py", line 98, in check_install_conflicts
        package_set = create_package_set_from_installed()
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_internal\operations\check.py", line 41, in create_package_set_from_installed
        package_set[name] = PackageDetails(dist.version, dist.requires())
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2607, in requires
        dm = self._dep_map
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2871, in _dep_map
        self.__dep_map = self._compute_dependencies()
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2881, in _compute_dependencies
        reqs.extend(parse_requirements(req))
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2942, in parse_requirements
        yield Requirement(line)
      File "C:\Users\yuji3\Anaconda3_5.2.0\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2951, in __init__
        raise RequirementParseError(str(e))
    pip._vendor.pkg_resources.RequirementParseError: Invalid requirement, parse error at "'; extra '"
    You are using pip version 18.0, however version 18.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
[/code]

# 質問

上記のエラーは、どのようにして調査・解決すればよいでしょうか？


CC BY-SA 4.0
2018-10-07T06:06:30.307
49032
2018-10-08T03:08:06.657
19524
question
python pip conda
`conda update --all`したら`pip install`がエラーになりました


役に立つかどうかはわかりませんが、コメントに書いた[pip install AttributeError:
_DistInfoDistribution__dep_map](https://stackoverflow.com/questions/52582563/pip-
install-attributeerror-distinfodistribution-dep-map)を載せておきます。そこにこのように書かれていました。  
一時的なエラーのようで、新しいリリースを待てば治ると思います。

`conda install 'testpath<0.4'`

とされてみたらいかがですか。

この解答から見るに、おそらく、一部のモジュールのバージョンだけが、ほかのものと非互換のまま、飛び出してしまったのでしょう。


CC BY-SA 4.0
2018-10-07T07:23:02.903
49033
2018-10-08T03:08:06.657
2020-06-17T08:14:45.997
-1
24284
49032
answer