Sublime Forum

Sublime Build System Python 3.12 Syntax Error

#1

Python 3.12.1 (v3.12.1:2305ca5144, Dec 7 2023, 17:23:39) [Clang 13.0.0 (clang-1300.0.29.30)] on
SyntaxError: invalid decimal literal
darwin

I am struggling running my python on my Sublime text. I need your guidance of how I can fix this

0 Likes

#2

Since it’s a syntax error, no one can help without your actual codes. Or maybe someone has a crystall ball.

0 Likes

#4

Is there any source you can provide about syntax error? I’ll try to figure out

0 Likes

#5

I think the best help I can provide is to say it again. Since it’s a syntax error, no one can help without your actual codes.

If you need a more clear instruction, provide your codes.

0 Likes

#7

0 Likes

#8

the text Python 3.12.1 (v3.12.1:2305ca5144, Dec 7 2023, 17:23:39) [Clang 13.0.0 (clang-1300.0.29.30)] on darwin isn’t valid Python code. Nor is >>>, it’s just something the interactive interpreter prints out - you’ll want to remove those.

0 Likes

#9

the >>> prepending the lines in the above code example may have been added by git as part of a merge conflict process. You should remove the “>>>” and resolve the merge conflict to fix your code.

0 Likes

#10

The output shown in the view is the result of a Python REPL being stored to disk; the >>> is the default prompt that the Python interpreter provides, with the following lines being the result of that output.

The error annotation at the top right of the first line shows that you have saved the transcript of an interactive Python session to a file and tried to execute it via Python; that doesn’t work.

As @kingkeith suggested above, you need to edit down your transcript to just the part that is the actual python code, removing the interpreter prompts and the output that executing each line provided.

0 Likes