btcrecover icon indicating copy to clipboard operation
btcrecover copied to clipboard

Error on requirements installation: egg_info did not run successfully. exit code: 1

Open 50egtftz opened this issue 9 months ago • 1 comments

Hi, apologies if this error is due to my own ignorance, I am new to this.

System: Ubuntu 22.04.4 LTS Python 3.10.12

When I run pip3 install -r requirements.txt, the following error shows. I looked at past issues and online, but could not find answers. Any help would be appreciated.

Defaulting to user installation because normal site-packages is not writeable
Collecting coincurve~=19.0.0 (from -r requirements.txt (line 1))
  Using cached coincurve-19.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.7 kB)
Collecting green~=3.3.0 (from -r requirements.txt (line 2))
  Using cached green-3.3.0.tar.gz (72 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [60 lines of output]
      /home/kaweah/.local/lib/python3.10/site-packages/setuptools/dist.py:493: SetuptoolsDeprecationWarning: Invalid dash-separated options
      !!
      
              ********************************************************************************
              Usage of dash-separated 'description-file' will not be supported in future
              versions. Please use the underscore name 'description_file' instead.
      
              By 2025-Mar-03, you need to update your project and remove deprecated calls
              or your builds will no longer be supported.
      
              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************
      
      !!
        opt = self.warn_dash_deprecation(opt, section)
      /home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py:270: UserWarning: Unknown distribution option: 'test_suite'
        warnings.warn(msg)
      running egg_info
      creating /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info
      writing /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/dependency_links.txt
      writing entry points to /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/entry_points.txt
      writing requirements to /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/requires.txt
      writing top-level names to /tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/SOURCES.txt'
      reading manifest file '/tmp/pip-pip-egg-info-cb50hsc4/green.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE'
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-x963b_db/green_5217ea17c06d444e9764fcb304c50b44/setup.py", line 22, in <module>
          setup(
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 983, in run_commands
          self.run_command(cmd)
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/dist.py", line 999, in run_command
          super().run_command(command)
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_command
          cmd_obj.run()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 312, in run
          self.find_sources()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 320, in find_sources
          mm.run()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/command/egg_info.py", line 548, in run
          self.prune_file_list()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/command/sdist.py", line 162, in prune_file_list
          super().prune_file_list()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_distutils/command/sdist.py", line 380, in prune_file_list
          base_dir = self.distribution.get_fullname()
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 272, in get_fullname
          return _distribution_fullname(self.get_name(), self.get_version())
        File "/home/kaweah/.local/lib/python3.10/site-packages/setuptools/_core_metadata.py", line 290, in _distribution_fullname
          canonicalize_version(version, strip_trailing_zero=False),
      TypeError: canonicalize_version() got an unexpected keyword argument 'strip_trailing_zero'
      [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.

50egtftz avatar Feb 28 '25 02:02 50egtftz

Fixed it by downgrading my setuptools

pip install setuptools==70.0.0

I chose version 70.0.0 randomly. Not sure at which version it broke down, but I was running the latest 75.8.2

50egtftz avatar Feb 28 '25 03:02 50egtftz

Thanks for the report, fixed a few modules that were impacted by this :)

3rdIteration avatar Mar 24 '25 18:03 3rdIteration