Sublime Forum

Python not found in computer

#3

Python -version
Thats all.

0 Likes

#4

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.

0 Likes

#5

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.

0 Likes

#6

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

2 Likes

#7

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.

0 Likes

#8

@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.

0 Likes

#9

So you say that I reinstall python using Chocolatey Python package. I will give a try let’s see what happens.

0 Likes

#10

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

0 Likes

#11

Sorry forgot to say I just solved the problem and thanks bschaaf for that. :grin::grin:

0 Likes

#12

@ Dexter6728
I am facing the same problem
Could u tell me how u solved it?

0 Likes

#13

Did you follow the recommendations in this thread?

0 Likes

#14

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~

0 Likes

#15

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.

0 Likes

#16

See Why so sudden love for microsoft authorised installations?

0 Likes

#17

oh man, thank you very much, i wasn’t attentive enough.

0 Likes

#18

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?

0 Likes

#19

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.

0 Likes

#20

Copy that. Save it first. Thanks

0 Likes

#21

i’m a beginner and having a same problem too. thanks for helping me out

0 Likes

#22

Here you got:


just need to create a new Build System, since we’re coding in Python3, i had the same issue, cheers
0 Likes