RequirementParseError while checking for conflicts
- pip version: pip-20.1.1 and also tried pip-20.3.dev0
- Python version: 3.8
- Operating system: Mac OS Catalina
pip pip3 install errs.
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
return self.__dep_map
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 98, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
raise exc
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pyparsing.py", line 3814, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd, found '(' (at char 11), (line:1, col:12)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3101, in __init__
super(Requirement, self).__init__(requirement_string)
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/packaging/requirements.py", line 100, in __init__
raise InvalidRequirement(
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'(===2.5.'": Expected stringEnd
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 519, in _determine_conflicts
return check_install_conflicts(to_install)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 107, in check_install_conflicts
would_be_installed = _simulate_installation_of(to_install, package_set)
File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 135, in _simulate_installation_of
package_set[name] = PackageDetails(dist.version, dist.requires())
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
dm = self._dep_map
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3033, in _compute_dependencies
reqs.extend(parse_requirements(req))
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3094, in parse_requirements
yield Requirement(line)
File "/usr/local/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3103, in __init__
raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Parse error at "'(===2.5.'": Expected stringEnd
#8676.
Oh wait this one’s different.
I tried this:
pip install pip-conflict-checker installed ok, then did this:
pipconflictchecker
and got this err:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3030, in _dep_map
return self.__dep_map
File "/usr/local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 2824, in __getattr__
raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 93, in __init__
req = REQUIREMENT.parseString(requirement_string)
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
raise exc
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
loc, tokens = self._parse( instring, 0 )
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 3205, in parseImpl
raise ParseException(instring, loc, self.errmsg, self)
pkg_resources._vendor.pyparsing.ParseException: Expected stringEnd (at char 11), (line:1, col:12)
Can you run ls /usr/local/lib/python3.8/site-packages and post the output here? It seems like there’s a malformed requirement line in one of the packages, but it’s impossible to tell with the exception.
$ ls /usr/local/lib/python3.8/site-packages
Cython numpy
Cython-0.29.15.dist-info numpy-1.18.1.dist-info
Flask-1.1.2.dist-info oauthlib
Flask_API-2.0-py3.8.egg oauthlib-3.1.0.dist-info
Flask_Cors-3.0.9-py3.8.egg ordered_set-4.0.2-py3.8.egg
JPype1-1.0.2.dist-info packaging
JayDeBeApi-1.2.3.dist-info packaging-20.4.dist-info
Jinja2-2.11.1.dist-info pandas
MarkupSafe-1.1.1.dist-info pandas-1.0.1.dist-info
PyYAML-5.3.1.dist-info pathlib-1.0.1.dist-info
TM1py-1.5.0-py3.8.egg pathlib.py
Werkzeug-1.0.1.dist-info pip
__pycache__ pip-20.3.dev0.dist-info
_jpype.cpython-38-darwin.so pkg_resources
_pytest pluggy
astroid-2.4.2-py3.8.egg pluggy-0.13.1.dist-info
attr psutil
attrs-20.2.0.dist-info psutil-5.7.0.dist-info
backports.zoneinfo-0.2.1-py3.8-macosx-10.15-x86_64.egg py
cachetools py-1.9.0.dist-info
cachetools-4.1.1.dist-info py4j
certifi py4j-0.10.7.dist-info
certifi-2020.6.20.dist-info pyasn1
chardet pyasn1-0.4.8.dist-info
chardet-3.0.4.dist-info pyasn1_modules
click pyasn1_modules-0.2.8.dist-info
click-7.1.2.dist-info pylint-2.6.0-py3.8.egg
cloudant pyparsing-2.4.7.dist-info
cloudant-2.9.0.dist-info pyparsing.py
colorama pytest
colorama-0.4.3.dist-info pytest-5.3.5.dist-info
confluent_kafka pytest_mock-3.3.1-py3.8.egg
confluent_kafka-1.5.0.dist-info python_dateutil-2.8.1.dist-info
cython.py pytz
dateutil pytz-2020.1.dist-info
e-1.4.5.dist-info pyximport
e.py raptors
easy-install.pth redis-3.5.3-py3.8.egg
easy_install.py requests
epmfacts-2.0.dist-info requests-2.23.0.dist-info
epmingestion requests_oauthlib
epmingestion-0.3.4-py3.8.egg requests_oauthlib-1.3.0.dist-info
epmingestion-0.3.4.dist-info rsa
flask rsa-4.6.dist-info
google services
google_auth-1.21.2-py3.8-nspkg.pth setuptools
google_auth-1.21.2.dist-info setuptools-49.2.0-py3.8.egg-info
idna sitecustomize.py
idna-2.10.dist-info six-1.15.0.dist-info
isort-5.5.3-py3.8.egg six.py
itsdangerous source
itsdangerous-1.1.0.dist-info termcolor-1.1.0.dist-info
jaydebeapi termcolor.py
jinja2 timeout_decorator-0.4.1-py3.8.egg
jpype toml-0.10.1-py3.8.egg
kubernetes tzlocal-3.0b1-py3.8.egg
kubernetes-11.0.0.dist-info urllib3
lazy_object_proxy urllib3-1.25.10.dist-info
lazy_object_proxy-1.4.3.dist-info wcwidth
markupsafe wcwidth-0.2.5.dist-info
mdxpy-0.2-py3.8.egg websocket
mock websocket_client-0.57.0.dist-info
mock-4.0.2.dist-info werkzeug
more_itertools wheel
more_itertools-8.5.0.dist-info wheel-0.34.2-py3.8.egg-info
nose wrapt-1.12.1-py3.8-macosx-10.15-x86_64.egg
nose-1.3.7.dist-info yaml
ty for your help
is this the line causing the issue maybe?
File "/usr/local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 95, in __init__
raise InvalidRequirement(
pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "'(===2.5.'": Expected stringEnd
jk not that ^
OK I went through the list, most of them seem to be fine. There is only one problematic package: epmingestion. Can you share the content of epmingestion-0.3.4.dist-info/METADATA and epmingestion-0.3.4-py3.8.egg?
BTW, you seem to have duplicated metadata installed for epmingestion (one as .egg and one as .dist-info). Try pip uninstall it, make sure both of the following are deleted (remove manually if not):
epmingestion-0.3.4-py3.8.egg
epmingestion-0.3.4.dist-info
and pip install it again.
uninstalling it solved my problem! thanks for your help