non root location for requirements.txt breaks nixpacks build
I attempted to build an api using nixpacks with the requirements.txt file outside of the root directory (e.g.
src/requirements.txt
). When doing this all builds failed with varying build commands.
What's the explanation for this behavior? Is there a way successfully build with requirements.txt
outside of the root directory?
Thanks in advance!8 Replies
Project ID:
bf95cb17-c0de-4d0a-97ee-acebaffa2e01
bf95cb17-c0de-4d0a-97ee-acebaffa2e01
is the rest of your project located in the src directory?
The entry point to the api is but the railway.json is not
I encountered
command not found
errors for pip
, pip3
, and python3
Solution
I would say you need to restructure your project
I was able to build the project but am curious what the explanation is behind this behavior and if it's possible to work with a different project structure
requirements.txt being inside of src/ is pretty irregular for python projects. It's expected to be inside the root folder
If you'd like any advice on your app's folder structure, I'd be happy to help out. Just send your GH repo or a screenshot of your folder structure in your IDE
thanks for offering. feel free to close.