pip install distribute - python setup.py egg_info did not run succesfully

311 Views Asked by At

I am trying to install distribute on my local machine however I receive this error (https://pypi.org/project/distribute/ )

Collecting distribute
  Using cached distribute-0.7.3.zip (145 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 14, in <module>
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/setuptools/__init__.py", line 2, in <module>
          from setuptools.extension import Extension, Library
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/setuptools/extension.py", line 5, in <module>
          from setuptools.dist import _get_unpatched
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/setuptools/dist.py", line 7, in <module>
          from setuptools.command.install import install
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/setuptools/command/__init__.py", line 8, in <module>
          from setuptools.command import install_scripts
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/setuptools/command/install_scripts.py", line 3, in <module>
          from pkg_resources import Distribution, PathMetadata, ensure_directory
        File "/private/var/folders/y7/ysy_r_bs7v75tx0lf8qv6sy40000gn/T/pip-install-y2gxx2jg/distribute_dedd336e6c49405d8413e05233daa88e/pkg_resources.py", line 1518, in <module>
          register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
      [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.

I have python 3.11, pip 22.1.2, setuptools 67.7.2 I have upgraded, uninstalled and reinstalled setuptools I have downloaded ez_setup 0.9 I have also run python3 -m ensurepip --upgrade to ensure I have pip and python installed properly

0

There are 0 best solutions below