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:
- a folder with only a
requirements.txt; - a
pyproject.tomlwhose[project]hasdependencies = ["requests>=2", "requests<2"]; dependencies = ["requests"], thenuv lock, then"six"added todependencieswithout re-locking (for--frozenonly the last 3 lines are shown, then.venv/bin/python -c "import six");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
- No
pyproject.tomlfound:uv synconly works on a uv project. For a plain requirements file useuv pip install -r requirements.txt(see uv pip install requirements.txt), or convert it withuv initthenuv add -r requirements.txt. - No solution found when resolving dependencies: the
cause:line names the conflicting requirements. Loosen one of the pins; there is no flag to sync anyway, since an environment that breaks a requirement is what uv refuses to build. - The lockfile needs to be updated, but
--lockedwas provided:pyproject.tomlchanged sinceuv.lockwas written (common in CI). Runuv locklocally and commituv.lock.--frozendoes not error, but it installs the old lockfile:sixwas silently missing. - Incompatible with the project's Python requirement: the interpreter (here forced with
-p 3.11, or picked from.python-version) is outsiderequires-python. Use a matching version (uv python install 3.14,uv sync -p 3.14) or relaxrequires-python.
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.