a month ago
Puzzled by this error when deploying a simple FastAPI app. No Docker. Repo has pyproject.toml and uv.lock files. Logs:
install mise packages: pipx, pipx:uv, python
copy pyproject.toml, uv.lock
uv sync --locked --no-dev --no-install-project
process "uv sync --locked --no-dev --no-install-project" did not complete successfully: exit code: 2
error: No interpreter found for Python >=3.12 in managed installations or search path
copy /mise/shims
ERROR: failed to build: failed to solve: process "uv sync --locked --no-dev --no-install-project" did not complete successfully: exit code: 2
3 Replies
25 days ago
Locally:
Open your pyproject.toml and ensure it has:
[project]
# ...
requires-python = ">=3.12"
# ...
A. If you change this, delete uv.lock and run uv lock (or uv sync --locked if you want to rebuild based on the new pyproject.toml) to regenerate it.
B. In your project root (same level as pyproject.toml): Create a new file named .python-version and put 3.12 inside it.
echo "3.12" > .python-version
Commit and push these changes to your repository.
Railway should then pick up the .python-version file and correctly set up the environment.
24 days ago
I think you should add a .tool-version
file with:python 3.12 or you downgrade the requires-python in pyproject.toml
to >= 3\.10
22 days ago
Thanks for the input. I had requires-python = ">=3.12"
already, I will try with .python-version file but it's a bummer if this is required in addition to pyproject.toml