Missing Python Package
Hey, it seems like the NodeJS container does not have Python installed, but some of the dependency requires to be compiled using Python. How would I solve this?
19 Replies
Please provide your project ID or reply with
N/A
. Thread will automatically be closed if no reply is received within 10 minutes. You can copy your project's id by pressing Ctrl/Cmd + K -> Copy Project ID.You could try creating a Dockerfile and adding the package to the container. This would give you complete control over the environment your app builds in and you can add Python and other packages as needed.
⚠️ experimental feature
No project ID was provided. Closing thread.
You can add python as a provider in the service settings, or in a nixpacks.toml
https://docs.railway.app/deploy/builds
https://nixpacks.com/docs/guides/configuring-builds
Thanks for the answer, I don't see the option to change provider in the service settings.
I don't either, but I use dockerfile, what builder are you using?
It's showing
Nixpacks
as the only option. If dockerfile is the only option here, are you able to send me a sample Dockerfile to use?I could but I think that's probably unnecessary, have a look at the nixpacks link I sent you
Thanks a lot, got it to work now. Though the build time is bit ridiculous lol.
No problem!
I just got another question.
Is there a way to manually trigger the build?
It looks like the build process is hanging around
COPY . ./app
step, and when I abort it, I have to make a change to the branch for it to trigger the build.A change to git, or fiddle with a variable, it's not the best solution but it seems to be what's being recommend
Alr, I'll just use those then, thanks again!
@zhiyan114 Jumping in here, you won’t get the option to change the builder. that’s been deprecated since heroku packs are gone. Your two options are nixpacks or a dockerfile. Dockerfile is auto detected if there is a dockerfile in the root directory
If by provider you mean the nixpacks environment provider, that’s best configured through a nixpacks.toml
Configuration File Reference | Nixpacks
App source + Nix packages + Docker = Image
much easier than wrangling docker
@Brody refer people to the link above rather than the links you put down. nixpacks.toml is the way to go in cases like these
Ah yes thats a much more helpful link, will do 👍
The setting is only available in the service settings if you are part of the beta program (type
/beta
here). https://docs.railway.app/deploy/builds#build-providersThanks for the info. I knew I had to enable the beta feature somewhere but couldn't find it. Was able to get it enabled when I tried to access public key feature, which it asked me to join the beta.