Problem with Script - Does not recognize Python


#1

Hi all,

I am new to programming and I chose atom as my development environment to collect some experiences.
When trying to run code in atom I encounter the following error message

‘python’ is not recognized as an internal or external command,
operable program or batch file.

Does anybody know what the issue might be?

Concerning my system:
Windows 10
Python 3.6.4
Atom with several packages among which script to run the code

I am very grateful for your help and looking forward to your comments.

Thanks a lot

Jonas


'python' is not recognized as an internal or external command
#2

Hello,

Very often this issue has something to do with Python not being listed in you Path environmental variable.

You can jump ahead and see if you can trigger Python to tell you which version it is:
Running Python on Atom

Consider putting out a web search for…
python & path site:https://discuss.atom.io

Caution: script does not handle user inputs.

Regards.


#3

Hi Thanks a lot, I am currently trying to search the web for a viable solution but until now I could not find anything :frowning:

I will give it another go tomorrow I will keep you posted in case I find any solution for the isse


#4

Please open a command line and type python --version to see if you can reach the Python interpreter that way. Let me know what the response is.


#5

Hi Thanks a lot for your reply I have to Type in py --version in order to get a result then the result is python 3.6.4


#6

If the command is in the system as py instead of python, then that’s your problem. script is configured to use the python command to execute all Python files. You can override this by setting up a config profile, which will allow you to tell script to use the correct command.


#7

Hi thanks a lot - we are getting closer to the solution :slight_smile: - one last question - where do I set up this config profile? in the script package itself?

thanks a lot and best
J


#8

Navigate the menus down to Packages -> Script and you will see an option to Configure Script. After that, you want to use Run with profile.


#9

Hi thanks a lot it worked now :slight_smile: I was putting into the Command field py and now it works like a charm :slight_smile: