14 days ago
am deploying a FastAPI backend to Railway connected to a Railway Postgres database.
The deployment consistently fails during the build phase at:
pip install -r requirements.txt
Build logs show:
ERROR: Could not find a version that satisfies the requirement fast==0.110.0
ERROR: No matching distribution found for fast==0.110.0
ERROR: failed to build: process "pip install -r requirements.txt" exited with code 1
The application is a Python FastAPI API using:
- FastAPI
- Uvicorn
- SQLAlchemy
- Railway Postgres (connected successfully)
- GitHub auto-deploy
The Postgres service is online and DATABASE_URL is correctly injected into the backend service environment variables.
The issue appears related to dependency resolution during Railway’s build process. A non-existent package version ("fast==0.110.0") was previously referenced, which prevented pip from completing installation.
Actions already taken:
- Updated requirements.txt to use valid FastAPI dependency
- Verified Python runtime installation
- Confirmed start command:
uvicorn app.main:app --host 0.0.0.0 --port $PORT
- Redeployed after committing fixes
Request:
Please confirm whether Railway build caching or dependency resolution could still be referencing an older requirements layer, and advise if a clean rebuild or cache purge is required.
Repository deploys correctly locally but fails only during Railway build.
2 Replies
Status changed to Awaiting Railway Response Railway • 14 days ago
14 days ago
seems like dockerfile > python version issue
and use uv to manage your python repo https://docs.astral.sh/uv/getting-started/installation/
14 days ago
Thanks — that makes sense. I’m going to explicitly pin Python via runtime.txt (python-3.11.x) and clear Railway build cache to rule out cached layers. I previously had a bad dependency entry (fast==0.110.0) which may still be cached in the build. Will report back after redeploy.