Sublime Forum

Python3 on Mac _ input() requires quotations

#1

I am new to Python and Sublime.
Trying the input() on Repl. if I entered the text without quotations the following error appears

Traceback (most recent call last):
File “test1.py”, line 1, in
q = input(‘test’)
File “”, line 1, in
NameError: name ‘h’ is not defined

Sys.version:
3.7.3 (default, Mar 27 2019, 09:23:15)
[Clang 10.0.1 (clang-1001.0.46.3)]

I hope I find a solution here

0 Likes

#2

I’m not expert, but I think Sublime text is auto defaulting to Python 2.

run this via REPL :

import sys
print(sys.version)

. you’ll probably see that REPL is using version 2.7 or something. (I think) you’d have to create a new build system re-directing Repl to python 3.

so now I found the answer for me, follow these instructions:

0 Likes

#3

It will use your system’s default python, whatever that may be.

1 Like