pip install "file:// does not appear to be a Python project" in CI
By Kaveh Alemi·Latchkey
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.
Diagnose it: which interpreter and which environment?
Terminal
which -a python python3 pip
python -c "import sys; print(sys.executable); print(sys.version)"
python -c "import sys; [print(p) for p in sys.path]"
pip list 2>/dev/null | head -20
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.toml or setup.py lives.
Run pip from that directory or pass its path explicitly.
Re-run the install.
Terminal
pip install ./packages/app
Add a build configuration if it is missing
If the directory is meant to be installable, give it a pyproject.toml with a build backend.
Run pip install from the directory holding the project metadata.
In monorepos, target the specific package path.
Keep a valid [build-system] in each installable package.
Frequently asked questions
What causes pip install "file:// does not appear to be a Python project" in CI?
There are 2 common causes: the install path is the wrong directory and a monorepo subproject was not targeted. pip ran from (or was pointed at) a directory above or beside the project, where no pyproject.toml/setup.py exists.
How do I fix pip install "file:// does not appear to be a Python project" in CI?
There are 2 fixes depending on which cause you have: install from the directory that has the metadata and add a build configuration if it is missing. Work through them in order, since the first is the most common.
What does pip install "file:// does not appear to be a Python project" in CI actually mean?
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".
How do I stop pip install "file:// does not appear to be a Python project" in CI happening again?
Run pip install from the directory holding the project metadata. The prevention section lists 3 changes that keep it from recurring.