uv sync errors: no pyproject, no solution, --locked, requires-python (tested)

Common uv sync errors: No pyproject.toml found (use uv pip install -r for requirements files), No solution found (conflicting pins), The lockfile needs to be updated, but --locked was provided (run uv lock and commit it; --frozen silently installs the old lock) and an interpreter outside requires-python.

1. Four uv sync errors, reproduced

uv 0.13.5 on Linux, each case in a fresh folder:

  1. a folder with only a requirements.txt;
  2. a pyproject.toml whose [project] has dependencies = ["requests>=2", "requests<2"];
  3. dependencies = ["requests"], then uv lock, then "six" added to dependencies without re-locking (for --frozen only the last 3 lines are shown, then .venv/bin/python -c "import six");
  4. requires-python = ">=3.14", synced with -p 3.11.
$ uv sync   # folder with only requirements.txt
error: No `pyproject.toml` found in current directory or any parent directory

$ uv sync   # conflicting requirements
Using CPython 3.11.17
Creating virtual environment at: .venv
error: No solution found when resolving dependencies
  cause: Because your project depends on requests>=2 and requests<2, we can conclude that your project's requirements are unsatisfiable.

$ uv sync --locked   # pyproject.toml changed after uv lock
Using CPython 3.11.17
Creating virtual environment at: .venv
Resolved 7 packages in 120ms
error: The lockfile at `uv.lock` needs to be updated, but `--locked` was provided.

hint: To update the lockfile, run `uv lock`.

$ uv sync --frozen
 + idna==3.20
 + requests==2.34.2
 + urllib3==2.8.0
ModuleNotFoundError: No module named 'six'

$ uv sync -p 3.11   # requires-python = ">=3.14"
Using CPython 3.11.17
error: The requested interpreter resolved to Python 3.11.17, which is incompatible with the project's Python requirement: `>=3.14` (from `project.requires-python`)

2. What each one means and the fix

Related: uv pip install vs uv add · uv pip compile · uv SSL errors.

Frequently asked questions

How do I fix "The lockfile at uv.lock needs to be updated, but --locked was provided"?

pyproject.toml changed after uv.lock was written. Run uv lock and commit the updated uv.lock. --frozen avoids the error but installs the stale lockfile.

Can uv sync ignore errors?

No. uv refuses to build an environment that breaks a requirement; fix the conflicting pins named in the cause line, or use uv pip install for ad-hoc installs.

Why does uv sync say No pyproject.toml found?

uv sync works on uv projects only. Use uv pip install -r requirements.txt, or uv init then uv add -r requirements.txt.

Written with AI assistance. Measured on 2026-10-23 with uv 0.13.5 and a uv-managed CPython 3.11.17 on Linux. Commands were run verbatim and the output pasted unedited (--frozen output trimmed to its last 3 lines, as stated). PlainTables is our extension; uv is free.