pip install "file:// does not appear to be a Python project" in CI
pip was asked to install a local path (., a directory, or a file:// URL) but found no pyproject.toml or setup.py there. Without project metadata, pip has nothing to build or install.
What this error means
pip fails with "ERROR: file:///home/runner/work/app/app does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found".
pip
ERROR: file:///home/runner/work/app/app does not appear to be a Python project:
neither 'setup.py' nor 'pyproject.toml' found.Common causes
The install path is the wrong directory
pip ran from (or was pointed at) a directory above or beside the project, where no pyproject.toml/setup.py exists.
A monorepo subproject was not targeted
The package lives in a subdirectory, but pip was given the repo root, which has no project metadata.
How to fix it
Install from the directory that has the metadata
- Confirm where
pyproject.tomlorsetup.pylives. - Run pip from that directory or pass its path explicitly.
- Re-run the install.
Terminal
pip install ./packages/appAdd a build configuration if it is missing
If the directory is meant to be installable, give it a pyproject.toml with a build backend.
pyproject.toml
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"How to prevent it
- Run
pip installfrom the directory holding the project metadata. - In monorepos, target the specific package path.
- Keep a valid
[build-system]in each installable package.
Related guides
pip install -e . editable install error in CIFix "pip install -e ." failures in CI - pip cannot build the editable install because the project metadata, b…
Python "ModuleNotFoundError: No module named 'tests'" in CIFix "ModuleNotFoundError: No module named 'tests'" in CI - an import of the tests package fails because the p…
Python "attempted relative import with no known parent package" in CIFix "ImportError: attempted relative import with no known parent package" in CI - a module using relative imp…