Skip to content
Sign upLog in
← Back to Community

I cant run python 3 on my nodejs project?

Profile icon
JDEliotHacker

i need to run a python3 script in my nodejs project but with python command it runs python 2.7 and i need python 3
python3 command doesnt work and i dont know what to do

thanks

Voters
Profile icon
JDEliot
Comments
hotnewtop
Profile icon
JDEliot

the thing its in a python project python3 works perfectly, i think i need to install python3 or something

Profile icon
JDEliot

when i run the command whereis run-project i get run-project:

Profile icon
Highwayman

hm. let me check out a node repl then i'll see what i can do.

@JDEliot

Profile icon
Highwayman

yeah yeesh it's definitly not there, I even manually looked through the directories. hm. I guess you'll just have to download python3 then. I'm not sure how else to fix that, cause yeah I can definitly see it's not there and all the versions of python are for 2.7.xx Interestingly, they have a specific executable "python2". seems weird to me, but anyways yeah.

@JDEliot

Profile icon
Highwayman

You'll notice that when you run a regular repl, the command that they use to run your program will be displayed. You can try looking there to see how they run it.

another thing I like to do to figure out how something is run on replit is to just look at the source code for their run-project executable. Another thing to note is that you should make sure you are trying to run said command (python3 p.py or whatever) in the shell and not the console, but you probably know that.

whereis run-project cp $PATH_TO_RUN_PROJECT ./ # "grep python ./run-project" or something like that. or just look at it with your eyeballs.