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

Facing issues? Have Questions? Post them here! I am happy to answer!







Author Info:

Rakesh (He/Him) has a Masters Degree in Computer Science with over 15+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright Code2care© 2024 | Privacy Policy | About Us | Contact Us | Search