Sublime Forum

Sublime 4 not showing any output when running Python 3 script

#1

Hi there,
I’ve been trying to get python3 to run in Sublime Text 4 on my MacBook Pro. I’ve installed the latest version of both Python3 and Sublime, and I know as a fact that Python runs just fine on terminal.

On Sublime 3, I’ve built a new system to run python3 using the following code (see image below) and it works fine! (saved it as a .sublime-build file.).

58

On Sublime 4, however, I’ve tried to use the very same code and it doesn’t work. Just to be clear, with “doesn’t work” I mean it doesn’t generate any output in the output window. At the bottom of the output window it says “building” but then no output pops up.

I could keep on using Sublime 3 instead of the latest version, 4. Yet, I would appreciate if someone could help me to understand what is happening.

Thanks in advance!

0 Likes

#2

ctrl+shift+b and then select Python.

Wondering why so many people ask this question recently.

0 Likes

#3

“Wondering why so many people ask this question recently” …
Maybe because it isn’t working?!
I tried to use both the default “Python”, which already exist in Tools/Build Systems, and the Python3 which I created. None of them work.
The default Python build system works on my Windows based computer, without even the need of creating a new build system. The problem only happens with my macbook and Sublime 4. Sublime 3 works fine, as I mentioned in my original post.

Any other suggestion?

Thanks

1 Like

#5

since your python build is custom, maybe i will first try the official one in st4. you can try st4’s safe mode first.

0 Likes

#6

Ok, maybe I haven’t explained it well on my first comment.
I first tried the default (official one) Python on build system of Sublime Text 4.
When that didn’t work, I then tried the custom made build system, just like I do with Sublime Text 3.

0 Likes

#7

Can you clarify in what way it doesn’t work?

0 Likes

#8

When I ask the script to print, nothing appears in the output window. The code runs (I see building at the bottom of the output window), but doesn’t print anything.

0 Likes

#9

What code are you trying to run?

0 Likes

#10

Don’t pass -i to a Python you’re using in a build system unless you want to be confused and disoriented when it goes interactive and you can’t ever interact with it. Or, rewrite your build system to use Terminus if you require the -i for what you’re doing.

0 Likes

#11

I tried even a simple code, such as:
print(“hello world”)

1 Like

#12

I just tried to build system without -i, still not giving an output result.
Empty output window after at the bottom tab (next to Line1, Column 21) shows ‘building’

09

1 Like

#13

From the screenshot, there is nothing like [Finished in 86ms] in the build output?

I still wonder how it goes in safe mode though.

0 Likes

#14

im having the same problem. has it been resolved?

1 Like

#16

I am having the same issue with my ST4 program as @marcelohmotta. I’m running Sonoma 14.4 on a MacBook Pro and was having Json issues with the program so I went and deleted the Application Support from the library and also cleared the cache then downloaded the app again.
I noticed that Sublime now only shows up on my downloads folder and not in applications. I’ve tried to drag it over but to no avail. Like @marcelohmotta even a simple print function of “hello world” shows a “building” in the console but nothing appears. I am a newbie to programming so be gentle.

0 Likes

#17

I’m going to use Brackets (Phoenix Code) instead of Sublime. There’s just too many configurations with ST4 that other text editors don’t make the user jump through.

0 Likes