Build Error
charlie
PROOP

a year ago

Suddenly my builds are failing without any change to the build set up.

Project ID: c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf

Link to example build log failing: https://railway.com/project/c61c1785-a8d8-43d0-9d8b-6bd1f69aa3bf/logs?environmentId=de84badd-db47-4935-8d8b-c1e3bfc17b6c&filter=%40snapshot%3Adc89d180-fa02-4d40-9285-25d3d6578107+OR+%40replica%3Adc89d180-fa02-4d40-9285-25d3d6578107&start=1736847556413

Seems to be struggling to find the gfortran file.

I've seen this issue before and it's fixed itself by just repeatedly redeploying the service which makes me think there's some underlying problem. It's a standard Django application so nothing overly complex in the setup.

Solved

4 Replies

charlie
PROOP

a year ago

Ok, after many failed deploys I've worked out the issue - it's the Python version.

The scipy package (which causes this) only goes up to version 3.11 which the documentation claims to be the default in Nixpacks (https://nixpacks.com/docs/providers/python) but I can actually see in the Nixpacks build the line:

/nix/store/901c80rlps5q05bnjk1sj4zaz5k736nc-python3-3.12.7

Which I'm assuming means it's using 3.12.7 , the fix here is to explicitly set the NIXPACKS_PYTHON_VERSION environment variable to 3.11 or lower. I'm wondering if the latest release of Nixpacks (https://github.com/railwayapp/nixpacks/releases/tag/v1.31.0) has changed this (couldn't see anything obvious but I'm no rust expert) or something else internally.

Not sure if this is just my project and I'm overlooking something or if anyone else has experienced this issue?


kamran-barzegari
HOBBY

a year ago

Thank you so much for sharing this solution! I was struggling with the same deployment issue for about 6 hours - the build kept failing during the pip install step. Setting the NIXPACKS_PYTHON_VERSION environment variable to 3.11 fixed it immediately. Really appreciate you figuring this out and sharing it with the community. This seems to be related to the recent Nixpacks v1.31.0 update and Python version compatibility.


a year ago

Thanks for sharing the solution! Marking this as solved


a year ago

!s


Status changed to Solved adam about 1 year ago


Loading...