xinyu1205 / recognize-anything

Open-source and strong foundation image recognition models.
https://recognize-anything.github.io/
Apache License 2.0
2.78k stars 271 forks source link

pip install error #192

Closed mipark56 closed 2 months ago

mipark56 commented 2 months ago

Hello, when following the Install RAM & Tag2Text in this guide https://github.com/IDEA-Research/Grounded-Segment-Anything , I get the below error. All steps up to this point had worked for me. If any errors, I was able to resolve it with web searches / debugging, but not this one unfortunately. Thanks in advance for any info.

pip install -e ./recognize-anything/ Defaulting to user installation because normal site-packages is not writeable Obtaining file:///home/mjpark/Grounded-Segment-Anything/recognize-anything Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [41 lines of output] Traceback (most recent call last): File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/packaging/requirements.py", line 102, in init req = REQUIREMENT.parseString(requirement_string) File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1654, in parseString raise exc File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1644, in parseString loc, tokens = self._parse( instring, 0 ) File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1402, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 3417, in parseImpl loc, exprtokens = e._parse( instring, loc, doActions ) File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/_vendor/pyparsing.py", line 1406, in _parseNoCache loc,tokens = self.parseImpl( instring, preloc, doActions ) File "/home/mjpark/.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 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 "/home/mjpark/Grounded-Segment-Anything/recognize-anything/setup.py", line 2, in <module>
      setuptools.setup()
    File "/home/mjpark/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 154, in setup
      _install_setup_requires(attrs)
    File "/home/mjpark/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 146, in _install_setup_requires
      dist.parse_config_files(ignore_option_errors=True)
    File "/home/mjpark/.local/lib/python3.8/site-packages/setuptools/dist.py", line 807, in parse_config_files
      self._finalize_requires()
    File "/home/mjpark/.local/lib/python3.8/site-packages/setuptools/dist.py", line 534, in _finalize_requires
      self._move_install_requirements_markers()
    File "/home/mjpark/.local/lib/python3.8/site-packages/setuptools/dist.py", line 573, in _move_install_requirements_markers
      inst_reqs = list(pkg_resources.parse_requirements(spec_inst_reqs))
    File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3099, in parse_requirements
      yield Requirement(line)
    File "/home/mjpark/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 3109, in __init__
      super(Requirement, self).__init__(requirement_string)
    File "/home/mjpark/.local/lib/python3.8/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.

j71200 commented 2 months ago

You might try to upgrade setuptools. pip install --upgrade setuptools Reference: https://github.com/xinyu1205/recognize-anything/issues/107

mipark56 commented 2 months ago

Yes, this fixed it, thank you. Closing this issue now.