This error indicates pip could not generate package metadata. This typically happens when a package's setup.py or setup.cfg is invalid or runs code that fails.
Fixes How to fix 'ERROR: Metadata generation failed' in Python
# How to fix 'ERROR: Metadata generation failed' in Python
When pip installs a package, it first reads the package's metadata (version, dependencies, etc.). This metadata comes from setup.py, setup.cfg, or pyproject.toml. If pip cannot read or generate this metadata—often because setup.py raises an error or is malformed—installation fails with a metadata generation error.
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.