Fix: ModuleNotFoundError: No module named setuptools.command.test

Error:
% pip3 install randomwords

Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1

from setuptools.command.test import test as TestCommand
ModuleNotFoundError: No module named 'setuptools.command.test'

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

Workaround: You will need to install setuptools version less than 72.0.0 and then run your pipeline.

Update: Try running your pipeline/pip command again and it should work, setuptools 72.0.0 has been yanked

https://pypi.org/project/setuptools/72.0.0/#history

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!