Why cant Python run in Atom?

Why cant Python run in Atom?

Your issue is probably that your Python command is not listed in your PATH environment variable.

Environment Variables are paths, values and other information stored by your operating system and used globally by the OS and different applications you use.

The best example for a command listed in the PATH environment variable is cmd or ping. try to tap Win+R and type cmd, note how it opens a new Command Line even though you dont really know where cmd.exe is stored on your hard drive? That is because the path C:WindowsSystem32 is stored in your PATH variable.

So, we know you installed python, but you want to be able to run it without specifying its path, how can we do that? Simply add it to our environment variables:

  1. Use the keyboard shortcut Win+Pause
  2. Click on Advanced system settings
  3. At the bottom of the window click on Environment Variables...
  4. In the System Variables section find the PATH variable
  5. Double click it
  6. A new window with a text box has opened, go to its end with the end button
  7. Paste the path C:UsersAustinDocumentsPython at its end (be sure to add a ; before pasting if there isnt one there.
  8. Click ok
  9. Open a new cmd window
  10. Try and type python you should be all set now, on the command line and in Atom.

If it isnt clear, the win button is the button on your keyboard with the windows icon on it.

Adding python to my path, (installed as C:Program FilesPython39Python.exe) worked, but only after restarting Atom. Make sure you do that. Looks like it doesnt dynamically watch and reload the path variable from the system ¯_(ツ)_/¯

Why cant Python run in Atom?

In very direct terms, it means that there is no executable file named python.exe in any dictionary in your search path (which I think is the PATH environment variable on Windows).

First of all, try executing python from the installation directory. If that works, you know that you have it installed properly, and that the problem is the search path. If that fails, try again with the full path name, such as C:UsersAustinDocumentsPythonpython.exe.

Does that move you closer to a solution?

Leave a Reply

Your email address will not be published. Required fields are marked *