Running Python on Atom


#1

Beginner here, I installed Python 3 and have installed atom packages to run, but I haven’t been able make it work. Using Windows 10 and Python 3.6.3. I tried to add an environmental variable to PATH and Python works on the cmd prompt but it’s not recognized in Atom. Do I need to save Python files in a specific folder to run on Atom? Thanks for any help!
First I tried with package script 3.17.3 but Python wasn’t recognized


I also tried with package platformio-ide-terminal 2.7.0 but again not recognized. Python 3.6.3 is definitely downloaded and named python.exe.

And I tried to make an environment variable on PATH to it (from another help forum), I’ll upload a screenshot of that in a comment. Thank you again!


How to run python in atom
#2

Here’s the environment variable PATH


I manually added the last line in list


#3

Try the script package, worked for me without modifying PATH- Script for Atom


#4

Have you closed and reopened Atom since installing Python?


#5

The output in the screenshot is script. And whether or not you have to modify the PATH is determined by what you’re installing, not by what Atom package you choose.


#6

Yes I tried using the script package but python wasn’t recognized. The first image has script enabled


#7

Yes I’ve restarted atom and in fact, my whole computer since installing python


#8

Hello.

Sorry to hear about your troubles.
Please could you try to mimic as exact as possible the following picture:
I have used Window’s Command Prompt application.
image

Please publish the screen capture of your result.

Cheers.


Problem with Script - Does not recognize Python
'python' is not recognized as an internal or external command
#9

I think all of the common causes are covered, so this will require you to perform some deeper investigation. Fortunately, there’s a package that’s perfect for that. process-palette lets you execute any command from within Atom. You can use a terminal package too, but this one lets you customize a lot of the variables and save all of your configurations. All I want you to do right now is run the commands env and python -v.


#10

Done
Screenshot (18)


#11

Update so it works now and I’m not sure why. I opened a new project folder which may have helped. Thanks everyone for your help


#12

Hi there,

I have also been having the same problem as @littleshow, but when I follow the cmd prompt procedures it shows me this:

image

I also get the same problem when I try and run programs in Atom.

Any help??


#13

Hey @ukendar-v,

Can you screen capture the image of your environment variable?


#14

Hi @FesterTY

I don’t exactly know how to find the environment variables. Sorry, I’m really new to this!


#15

Here’s where you can find it:

Control Panel > System > Advanced System Setting > Advanced > Environment Variables > System Variables > PATH

From Path, hit edit to see which files you have there.

EDIT: The directory I typed wasn’t complete


#16

Here:


#17

I’d suggest you to reinstall Python. This happened to me once, but after reinstalling it, everything went back to normal. Also, make sure you tick Add Python to environment variables in the setup.


#21

Thank you for all the help from this forum - glad to say that I got it working!

So, after some discussion, I had to re-install Python, but also make sure that Python was added to environment variable on installation. Additionally, I disabled the path length limit after installation.


#22

after going through of the same steps as you I find myself with the above issue,please help me.


#23

my_Dictionary.py is not a program. It’s a plain-text script that you need a program to interpret. The command you want is python my_Dictionary.py.