pip attempted to install a package using the legacy (pre-wheel) installation method, which failed. This typically means the package's setup.py has an error or incompatibility.
Modern pip prefers wheels (pre-compiled packages). When a wheel isn't available, pip falls back to legacy install: downloading source and running 'python setup.py install'. If setup.py fails, pip reports a legacy install failure.
Review the error message above and identify which cause applies to your situation. Run additional diagnostics if needed.
Follow the corresponding solution from the causes section above.
Once you've addressed the root cause, try running 'pip install' again.
ModuleNotFoundError: No module named 'pkg_resources'
How to fix "No module named 'pkg_resources'" in Python
ValueError: math domain error
How to fix "ValueError: math domain error" in Python
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/lib/python3/dist-packages'
How to fix "Permission denied" when installing packages with pip