HELP: Unable to run Python on Atom


#1

Hi,
I just recently started as a Ubuntu Linux user and was extending my interest into python coding using Atom.
i installed atom via ubuntu softwares and installed script package. while trying to run a python file, i get the message
" Unable to run

python

Did you start Atom from the command line?

atom .

Is it in your PATH?

PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin "

Could one of you help me get around this? i’m completely new to linux so not that proficient with the commands as such
Thaaannnkkks


#2

Have you installed Python?


#3

Doesn’t ubuntu come installed with python by default?
i haven’t tried to intsall it separately but when in terminal and if i type in:-
=> $ which python3
I get the output:-
=> /usr/bin/python3

So i infer from this that python is on the system, but i just dont have it in PATH?
am i right in that?
if so, plis help


#4

No, because Atom is trying to run python, and you looked for python3. You should use which python or python --version to check. If it’s the case that your computer doesn’t have the python command, you can create one:

sudo ln /usr/bin/python3 /usr/bin/python

#5

One step left of your original topic…
I recommend you find a way to execute scripts in the command line.
script cannot handle user inputs via input() for example.

Search within this forum for more detail.


#6

Thanks a looootttttt
All the other solutions i looked up didnt help me one bit but yours did

Also yea i get why atom was unable to find python. Thanksssss


#7

oh yea i just ran into that issue.
I ran a program with classes which required user input using the input() func on python but yea, atom didnt let me enter that.
I’ll look through the forum for more details.
Thanks so so so so much
i feel like i’ll be on this discuss page a lot XD


#8

Because it’s really weird for any version of Python to be installed without a python symlink being built automatically.

Try the script-runner package.