# pkg_resources.ContextualVersionConflict: (foo 1.0 (/venv/lib/python3.11/site-packages), Requirement.parse('foo>=2.0'), {'bar'})

- **ID:** `python/setuptools-entry-points-collision`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A plugin/entry point consumer (`bar`) requires foo>=2.0, but an older foo is activated in the same working set, so pkg_resources raises a conflict when resolving entry points.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   Upgrade foo in the same environment and restart the process: `pip install --upgrade 'foo>=2.0'`.
   ```
2. **** (80% success)
   ```
   Isolate plugins per environment so entry points resolve against one consistent set of distributions.
   ```

## Dead Ends

- **** — Does not affect the already-running process's working set. (85% fail)
- **** — pkg_resources reads installed distributions, not just sys.path. (70% fail)
