Skip to content

Installing problems of pyhash #70

@sun123-cmd

Description

@sun123-cmd

I wonder how can I solve this problem while installing pyhash with pip

Environment

Python 3.10.13, Centos 7

Bug with setuptools=58

commandpip install pyhash, error occurs as:

× python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Traceback (most recent call last):
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2458, in resolve
          return functools.reduce(getattr, self.attrs, module)
      AttributeError: module 'setuptools.dist' has no attribute 'invalid_unless_false'
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-__sfhh78/pyhash_ad0e59a7dd9c43a5b3de19ef3e1ab5f7/setup.py", line 129, in <module>
          setup(name='pyhash',
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/setuptools/__init__.py", line 153, in setup
          return distutils.core.setup(**attrs)
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/distutils/core.py", line 108, in setup
          _setup_distribution = dist = klass(attrs)
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/setuptools/dist.py", line 446, in __init__
          _Distribution.__init__(
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/distutils/dist.py", line 292, in __init__
          self.finalize_options()
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/setuptools/dist.py", line 822, in finalize_options
          ep(self)
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/setuptools/dist.py", line 829, in _finalize_setup_keywords
          ep.load()(self, ep.name, value)
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2450, in load
          return self.resolve()
        File "/home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2460, in resolve
          raise ImportError(str(exc)) from exc
      ImportError: module 'setuptools.dist' has no attribute 'invalid_unless_false'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Bug with setuptools=69.10(latest)

command:pip install pyhash, and error occurs as:

error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      /home/sunwenhao/miniconda3/envs/RoboFlamingo/lib/python3.10/site-packages/setuptools/__init__.py:80: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
      !!
      
              ********************************************************************************
              Requirements should be satisfied by a PEP 517 installer.
              If you are using pip, you can try `pip install --use-pep517`.
              ********************************************************************************
      
      !!
        dist.fetch_build_eggs(dist.setup_requires)
      error in pyhash setup command: use_2to3 is invalid.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

If I use command pip install --use-pep517 pyhash, error occurs as:

error: subprocess-exited-with-error
  
  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      error in pyhash setup command: use_2to3 is invalid.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions