Sublime Forum

Running on Mac for first time


Not sure why I’m getting an error here. I installed package control/REPL etc. It works on PC. Thoughts?

favorite_numbers = {
	'jen': 5,
	'rich': 7,
	'steve': 9,
	'charles': 11,
	'ash': 1,

for name, number in favorite_numbers.items():
	print(f"{name.title()}'s favorite number is {number}.") 
File "/Users/thedude/Documents/Sublime_Text/", line 19
    print(f"{name.title()}'s favorite number is {number}.")
SyntaxError: invalid syntax


That’s running fine for me on Linux with both python 2 and 3. Have you tried just running the file from the command line? (btw macs are also PCs - personal computers - though I assume you’re specifically referring to Windows)



Thanks for the reply. Yes, correct it works on a Windows 10 machine running sublime but not on this new MacBook Pro.

I’m not familiar with terminal nor IDLE.

IDLE gave me what seemed to be a formatting error.
SyntaxError: multiple statements found while compiling a single statement
And when I messed with it, it stopped building anything at all.

This is from sublime settings.
“bootstrapped”: true,
“10% Too Dull for My Tastes Color Scheme”,
“1337 Color Scheme”,
“Package Control”,

It’s giving me the same error in REPL…

thanks in advance.



I properly formatted your first post. I had assumed the syntax error was with the print as that’s where the chevron was pointing, but it’s actually with the ". You’re using python 2 but your code required python 3.



option shift [ = ”
that sucks

but that just throws a different error.

SyntaxError: Non-ASCII character ‘\xe2’ in file /Users/thedude/Documents/Sublime_Text/ on line 19, but no encoding declared; see for details

but it also shows

[path: /Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin]

So I’m running version Python 3.9

I’ll have to look into this more
thx again