Click here to Skip to main content
15,900,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey,
I'm new to atom and python.
As far as I understand, i need to run Atom through the cmd and point to the folder where the python.exe file is installed.
My question is if I create a file with a .py extension in another folder and want to run it, how do I change the Atom settings so that the file can run properly?
The error I keep getting in this situation is:
"python was not found but can be installed from the microsoft store"
Thanks, oron.

What I have tried:

......................................................
Posted
Updated 4-Nov-19 1:49am

You can add the path to the python directory in your PATH environment variable. This way, you will not have to provide the full path to the python.exe executable.
 
Share this answer
 
Comments
oronsultan 4-Nov-19 7:54am    
How exactly do i do it? Can you please tell me what steps I should take?
phil.o 4-Nov-19 8:00am    
There you will get the method:
How to Add to Windows PATH Environment Variable[^]
oronsultan 4-Nov-19 8:04am    
this is what i have:
C:\Users\OronS\AppData\Local\Programs\Python\Python38\Scripts\;C:\Users\OronS\AppData\Local\Programs\Python\Python38\;C:\Users\OronS\.dnx\bin;C:\Users\OronS\AppData\Local\Microsoft\WindowsApps;C:\Users\OronS\AppData\Local\atom\bin
is this ok?
phil.o 4-Nov-19 8:06am    
How should I know? :)
I do not have access to your computer, so there is no way for me to check for the correctness of these settings. The only thing I can say is that this seems synctactically correct.
oronsultan 4-Nov-19 8:11am    
the python.exe file does exist in this path, but I have 2 questions:
A. Is it okay to have two paths regarding python? (One for python.exe and one for its scripts)
B. Do I need to make changes to atom settings so that python files run according to the environment variable?
Found the answer!
On the top menu click Packages -> Script -> Configure script and on the 'Current Working Directory' copy the path which python.exe is install, e.g: C:\Users\OronS\AppData\Local\Programs\Python\Python38
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900