Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "': requir'": Expected stringEnd #539

Open
2741913295 opened this issue Dec 17, 2024 · 2 comments

Comments

@2741913295
Copy link

code fault as follows:

(dpa) xw@jmserver07-4090:~/xwdata/DeepPriorAssembly/grounded_sam$ pip install -e ./recognize-anything/
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/mmpose-0.28.0-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/json_tricks-3.17.3-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/xtcocotools-1.14.3-py3.11-linux-x86_64.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/munkres-1.1.4-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/Cython-3.1.0a1-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
DEPRECATION: Loading egg at /home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/chumpy-0.70-py3.11.egg is deprecated. pip 24.3 will enforce this behaviour change. A possible replacement is to use pip for package installation. Discussion can be found at pypa/pip#12330
Obtaining file:///mnt/disk001/xwdata/DeepPriorAssembly/grounded_sam/recognize-anything
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
Traceback (most recent call last):
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 102, in init
req = REQUIREMENT.parseString(requirement_string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString
raise exc
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString
loc, tokens = self._parse( instring, 0 )
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl
loc, exprtokens = e._parse( instring, loc, doActions )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache
loc,tokens = self.parseImpl( instring, preloc, doActions )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/xw/anaconda3/envs/dpa/lib/python3.11/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 4), (line:1, col:5)

  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 2, in <module>
    File "<pip-setuptools-caller>", line 34, in <module>
    File "/mnt/disk001/xwdata/DeepPriorAssembly/grounded_sam/recognize-anything/setup.py", line 2, in <module>
      setuptools.setup()
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/setuptools/__init__.py", line 154, in setup
      _install_setup_requires(attrs)
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/setuptools/__init__.py", line 146, in _install_setup_requires
      dist.parse_config_files(ignore_option_errors=True)
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/setuptools/dist.py", line 807, in parse_config_files
      self._finalize_requires()
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/setuptools/dist.py", line 534, in _finalize_requires
      self._move_install_requirements_markers()
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/setuptools/dist.py", line 573, in _move_install_requirements_markers
      inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs))
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3099, in parse_requirements
      yield Requirement(line)
            ^^^^^^^^^^^^^^^^^
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/__init__.py", line 3109, in __init__
      super(Requirement, self).__init__(requirement_string)
    File "/home/xw/anaconda3/envs/dpa/lib/python3.11/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 104, in __init__
      raise InvalidRequirement(
  pkg_resources.extern.packaging.requirements.InvalidRequirement: Parse error at "': requir'": Expected stringEnd
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@olijouve
Copy link

Exact same issue here...

@sjtuchenye
Copy link

You can try:

pip install --upgrade setuptools

which fixes my issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants