# error: subprocess-exited-with-error: python setup.py egg_info did not run successfully. exit code: 1. Cython.Compiler.Errors.CompileError: /tmp/pip-install-xxx/package/src/foo.pyx:1:0: 'bar.pxd' not found

- **ID:** `pip/egg-info-failure-requires-cython`
- **Domain:** pip
- **Category:** build_error
- **Error Code:** `ERROR`
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

The package requires a Cython extension file (.pxd) that is missing from the source distribution, often because it is generated by a build script that was not run before packaging.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| pip 23.2 | active | — | — |
| pip 24.0 | active | — | — |
| setuptools 68.0 | active | — | — |
| Cython 3.0.8 | active | — | — |

## Workarounds

1. **Install the package from its VCS repository (e.g., git) which includes the build script that generates the .pxd file: pip install git+https://github.com/user/package.git** (85% success)
   ```
   Install the package from its VCS repository (e.g., git) which includes the build script that generates the .pxd file: pip install git+https://github.com/user/package.git
   ```
2. **Patch the source distribution by downloading the .tar.gz, extracting it, running the build script (e.g., python setup.py build_ext --inplace) to generate the missing .pxd, then repackaging and installing with pip install ./package-version.tar.gz** (70% success)
   ```
   Patch the source distribution by downloading the .tar.gz, extracting it, running the build script (e.g., python setup.py build_ext --inplace) to generate the missing .pxd, then repackaging and installing with pip install ./package-version.tar.gz
   ```
3. **Contact the package maintainer to request a fixed source distribution or wheel that includes the missing .pxd file.** (30% success)
   ```
   Contact the package maintainer to request a fixed source distribution or wheel that includes the missing .pxd file.
   ```

## Dead Ends

- **Manually creating a dummy .pxd file with the same name in the package directory** — The .pxd file has specific type declarations and interfaces that must match the .pyx file; a dummy file will cause compilation errors or silent failures. (95% fail)
- **Running pip install --no-build-isolation to use system Cython** — The missing .pxd is not a Cython version issue; it's a missing source file that no Cython version can generate without the original build script. (90% fail)
- **Installing the package from a pre-built wheel instead of source** — If the package maintainer did not publish a wheel for the platform/Python version, this option is not available. (70% fail)
