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.
Fixes How to fix 'Legacy install failure' error in pip
# How to fix 'Legacy install failure' error in pip
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.