Sublime Forum

Sublime fails to connect to python

#1

When I try to run the simple "print (“hello”) I get the following error message:

C:\Users\Owner\AppData\Local\Programs\Python\Python39\python.exe: can’t find ‘main’ module in ‘’

That is the correct location of Python. Why am I getting this error and how to I fix the problem?

Thanks,
Ken Whipple

0 Likes

#2

Is python in your Windows PATH? Check the System Variables menu to be sure.

0 Likes

#3

I’m a 73 year old newbie. I entered MicroSoft key + R key. Then entered the above file name and a terminal window opened up for Python 3.9.6.

Does this mean it is in the PATH or do I need to check the PATH another way?

0 Likes

#4

here you go.

0 Likes

#5

Thanks! Much appreciated.

0 Likes

#6

Your problem is that you didn’t save your Python code to disk before you tried to run it the first time. The error message indicates that Python was properly executed, but it was not given the name of a file to execute. Save the file to disk first and it should work better.

0 Likes