#How to install python3 on railway server for Node.js project

19 messages · Page 1 of 1 (latest)

small juniper
#

I'm running a python script in my node js API and it works locally but i don't think python3 is installed on my railway server and i'm getting errors, how do i fix this?

primal kernelBOT
#

Project ID: N/A

carmine notchBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

small juniper
#

N/A

inland pelican
#

add a nixpacks.toml file to your project with this

[phases.setup]
nixPkgs = ["...", "python3"]
#

please keep your questions in #1006629907067064482
spamming other channels will result in a kick

small juniper
#

my apologies

#

that's all? does the ellipses need to be anything?

#

appreciate your help

#

do i install other pip packages here as well?

#

getting an issue with an installed module

inland pelican
#

do you need to install python packages?

small juniper
#

yeah

#

getting ModuleNotFoundError: No module named in my server logs

inland pelican
#

okay I will circle back around to this thread later, in the mean time can you please provide me with your repo so that once I get back I'll be able to create a nixpacks.toml file for you

small juniper
#

i'm just running a python script using the
"spawn" command from "child_process" in my node controller and that python script imports the module "telethon"

from telethon.sync import TelegramClient
import sys
import json
import os

for which on my local i ran "pip3 install telethon"

the rest of the codebase is irrelevant, your suggestion got the python file running it is just missing this telethon module and i'm not sure how to install it

(can i ssh into the railway server? or do i need to do something in this .toml file?)

inland pelican
#

telethon counts as a userbot unfortunately

small juniper
#

oh drats thanks for letting me know, ill find a different solution