# FileNotFoundError: [Errno 2] No such file or directory: 'setup.py'
ERROR: Failed to build 'foo' when getting requirements to build wheel

- **ID:** `python/setuptools-no-setup-py`
- **Domain:** python
- **Category:** install_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The project has no setup.py (pyproject.toml-only) but a tool or pip invocation assumes the legacy setup.py entry point, or the working directory is wrong.

## Version Compatibility

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

## Workarounds

1. **** (92% success)
   ```
   Add a minimal pyproject.toml with a build backend:
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "foo"
version = "1.0.0"
   ```
2. **** (85% success)
   ```
   Confirm you are in the project root:
ls pyproject.toml setup.py setup.cfg
pip install .
   ```

## Dead Ends

- **** — An empty setup.py makes the build fail later with 'no commands supplied' or metadata errors. (85% fail)
- **** — Still expects a build backend; if pyproject.toml is missing, there is nothing to build. (70% fail)
