# pip._vendor.packaging.version.InvalidVersion: Invalid version: 'v1.2.3-beta!'

- **ID:** `python/pip-legacy-version-parse-invalidversion`
- **Domain:** python
- **Category:** data_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A requirement string or metadata contains a version not conforming to PEP 440.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.x | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   pip install "foo==1.2.3b1"  # correct pre-release format
   ```
2. **** (85% success)
   ```
   pip install git+https://github.com/org/foo.git@v1.2.3-beta
   ```

## Dead Ends

- **** — Legacy resolver still parses versions and fails. (70% fail)
- **** — Pre-release flag does not accept non-PEP440 versions. (65% fail)
