Sublime Forum

Python program isn't running

#1

For some reason when I try to run a very simple print statement, it doesn’t even try to run. The terminal stays blank the entire time after I hit Command-B. Has anyone experienced this before? I created a proper build system which didn’t work, and I’ve even deleted and re-installed Sublime. I’m on Mac.

Any help would be appreciated! I just want to keep learning, but I’ve wasted my night trying to figure this out.

0 Likes

#2

What build system have you created? Does running the command that the build tries to run manually in the Terminal work?

0 Likes

#3

The build system I created was:

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

When I try to run the same command in the terminal, it does work. The terminal is working properly.

0 Likes

#4

Are you sure that’s the build that you’re running?

0 Likes

#5

Yes, it is selected. I’ll delete it and give it another try. If that doesn’t work, would you have any other suggestions?

Edit: I recreated the build system and it didn’t work. I also deleted Sublime, re downloaded it and created the build again with no luck. The output terminal is just blank when I try to run the program. Maybe I should just use a different IDE? That would be too bad, I like Sublime.

0 Likes

#8

Try deleting the trailing comma in the build command.

0 Likes

#9

It didn’t work unfortunately :frowning:

0 Likes

#10

Does it work if you run the same command in your terminal?

0 Likes

#11

Yeah, my terminal is working properly

0 Likes

#12

What result do you get if you use the Python build that ships with Sublime? Presuming you’re in a 4k build, it’s pre set up to use python3 so you don’t have to do anything.

It’s probably also worth noting that since your Sublime configuration is held in your user folder, deleting and reinstalling the application rarely, if ever, fixes a problem.

To make sure that it’s not an install problem, run Sublime in Safe Mode, create the build. and see what happens.

You should also check the Sublime console to see if there are any issues reported there (View > Show Console).

1 Like

#13

When I run it with the default Python build, nothing changes. Still the same problem.

Also, the program does not run in safe mode either.

When I click on “Show Console” it actually is displaying a traceback! I think you might be onto something. I’m still unsure of what to do about it though. What do you think?

0 Likes

#14

That looks like a macOS permission issue. See https://stackoverflow.com/questions/58479686/permissionerror-errno-1-operation-not-permitted-after-macos-catalina-update

1 Like

#15

~ IT WORKED!!! ~

I had to allow Sublime to access my files.

Odat and bschaaf, thank you SO much! I couldn’t have figured this out without you both.

1 Like