#No interpreter found for Python

1 messages · Page 1 of 1 (latest)

late basalt
#

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
inland fossilBOT
#

Project ID: a090c80a-f89e-466b-8c1d-0e854f5118aa

late basalt
#

a090c80a-f89e-466b-8c1d-0e854f5118aa

copper irisBOT
#

New reply sent from Help Station thread:

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.

You're seeing this because this thread has been automatically linked to the Help Station thread.

copper irisBOT
#

New reply sent from Help Station thread:

I think you should add a
.tool-version
file with:
python 3.12
or you downgrade the requires-python in p
yproject.toml
to

= 3.10

You're seeing this because this thread has been automatically linked to the Help Station thread.