I have installed python 3.8 in my computer and it runs well in the command prompt and the idle, but when I run the python commands from sublime it says that python was not found in your computer but can be installed from windows store. Please help me fix this. Thank you in advance.
Python not found in computer
Can you paste in the contents of the build output window for a failing build as well?
Generally speaking, if you try to run a program that doesnât exist on windows, you get a message about it being an unknown command or batch file. If youâre getting a message that tells you to go to the windows store that sounds more like itâs successfully running something, and that something is whatâs telling you that you need to set up something else.
What do you mean? I really didnât understand. But the console output is same for any code I write. The same thing is happening even with atom ide.
Iâve had a problem similar to this in windows recently. This might help: https://stackoverflow.com/questions/56974927/permission-denied-trying-to-run-python-on-windows-10
How are you trying to run the âpython commandsâ from sublime ? If possible, list the steps that you took to do this so that the community can help in debugging your problem.
@Dexter6728, the link by @bschaaf seems to describe well the problem.
My advise is to install Python via the Chocolatey Python package â Chocolatey is a sort of âpackage managerâ for Windows, allowing to easily keep up to date languages and programs that donât self update.
The Chocolatey Python package isnât affected by the problems youâre experiencing for it has no connections with the Windows Store.
Chocolatey is also available as a graphic front end via Chocolatey GUI.
So you say that I reinstall python using Chocolatey Python package. I will give a try letâs see what happens.
The second part of correcting it is to type âmanage app execution aliasesâ into the Windows search prompt and disable the store versions of Python altogether.
Might also just work
I forgot to choose python instead of python3 from the âbuild systemâ
(i am just a beginner I was so confused â„ïčâ„ïŒ
Now it is working.
Thank you~
Sorry guys, i am also a beginner i didnât want to disturb you so i tried to follow some of the instuctions you have have written above, but however it tells me to instal the python from the windows store. I am really a begginer i do not understand a lot of things so i am sorry. I even tried to install Python using Chocolatey Python package, it will not work however. I guess i shouldât go into programming for sure, i should have understood that when i signed for the cisco programming course, man i didnât know anything, i had look on spotoclub.com for the answers, i am just so bad. Could you please help me, anyone.
Related newb question. I followed the steps highlighted and was successful in installing python via chocolatey but currently i have the write
{
âcmdâ: [âpython3â, â-uâ, â$fileâ],
}
at the beginning of each file in order for code to process
other wise this happens.
C:\Python38\python.exe: canât find âmainâ module in ââ
[Finished in 0.2s]
Is this right?
No, you only have to create a single sublime-build
file and it will work for all Python code.
The error that youâre referencing there happens if you try to run a brand new Python file without saving it to disk first. Python is an external program that has no access to information sitting inside of an unsaved window in another program (in this case Sublime), so in order for it to work the data has to be on disk.
This error means that the file has no name (the module is ''
instead of say 'helloworld.py'
or something), and since itâs not a file on disk, it has no content in it and thus Python canât find anything to run in it.