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
Percy
Percy2y ago
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.
Percy
Percy2y ago
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
Percy
Percy2y ago
No project ID was provided. Closing thread.
Brody
Brody2y ago
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
The Big E in Math -> Σ
Thanks for the answer, I don't see the option to change provider in the service settings.
Brody
Brody2y ago
I don't either, but I use dockerfile, what builder are you using?
The Big E in Math -> Σ
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?
Brody
Brody2y ago
I could but I think that's probably unnecessary, have a look at the nixpacks link I sent you
The Big E in Math -> Σ
Thanks a lot, got it to work now. Though the build time is bit ridiculous lol.
Brody
Brody2y ago
No problem!
The Big E in Math -> Σ
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.
Brody
Brody2y ago
A change to git, or fiddle with a variable, it's not the best solution but it seems to be what's being recommend
The Big E in Math -> Σ
Alr, I'll just use those then, thanks again!
Adam
Adam2y ago
@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
Adam
Adam2y ago
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
Brody
Brody2y ago
Ah yes thats a much more helpful link, will do 👍
jr
jr2y ago
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-providers
The Big E in Math -> Σ
Thanks 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.
Want results from more Discord servers?
Add your server