Sublime Forum

Python 3.10 with sublime text 4

#1

New to both python 3.10 and sublime text 4. I’m using the python crash course book to begin this journey. I have installed python 3.10 and sublime text 4 on windows 10. I can’t get it to print hello World. I see this topic on the forum for earlier versions of python and sublime text but not for the versions I’m using. Is there going to a difference. Any type of advice will help. Thank you all.

{
“cmd”: [“python3”, “-u”, “$file”],
}

0 Likes

#2

Nothing has changed in either Python not Sublime Text for the previous topics to not apply.

2 Likes

#3

On windows you should be using py to execute your script, not python3.

Generally speaking, unless you’re installing Python in some really esoteric way, the Python build system that ships with Sublime Text 4 should be sufficient to execute newer versions of Python on all OS’s now by default and no longer requires custom tweaking.

You may find this useful:

2 Likes

#4

Appreciate it. I will give a look. Thank you.

0 Likes

#5

Gave it a shot. It didn’t work. From what I’m reading the display command is the issue. Cntrl-b let’s me know how fast it finished but no ‘hello python world’. I also used the info from the attached video. I will continue to gather more information and hopefully something will work.

0 Likes

#6

If your code doesn’t fail but also doesn’t provide any output, the most common reason is people using to working in a Python REPL where entering 2 + 2 automatically prints 4. When executing a Python script as you would from a standard build system, this calculates the value and then throws it away because there is no print() that tells it to display the result.

0 Likes

#7

Hi All, I’m a new user, in the same situation as SJNoob: installed Python 3.10 and Sublime text 4 in MacOS, and crash course book on the desk, and I’m not able to print “Hello World”.
I tried several time, but it doesn’t work, at least syntax error, also if I’m sure it is ok.
Reading on the web I found this in another case, and I adopted the suggestion: install Python 3.9 with Sublime text 4, and now:
IT WORKS!!!
Hello World!
:partying_face:

0 Likes