# ERROR: Invalid constraint: 'package<2.0,>=1.0' (from constraints.txt)

- **ID:** `python/pip-install-error-invalid-constraint`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A constraints file contains a malformed version specifier, such as a comma-separated list without proper spacing or an invalid operator. pip's parser expects specific syntax.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.7 | active | — | — |
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Correct the constraint syntax: use spaces around commas, e.g., 'package>=1.0,<2.0'.
   ```
2. **** (90% success)
   ```
   Validate constraints with pip install --dry-run -c constraints.txt to catch errors early.
   ```

## Dead Ends

- **** — May install incompatible versions, leading to runtime errors. (75% fail)
- **** — If the file is required for the project, ignoring it can break the build. (60% fail)
