Sublime Forum

Can't Get Out of the Starting Gate

#1

Trying to use Sublime Text v 2.0.2 with python 3.7.0 on OS 10.6.8. Created Python3.sublime.build as follows:

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

then tried to build hello_world.py with:

print(“Hello”)

Get error message:

[Errno 2] No such file or directory
[cmd: [u’python3’, u’-u’, u’/Users/sjc/Documents/Projects/4. Projects, Potential/Python, Learn/python_work/hrllo_world.py’]]
[dir: /Users/sjc/Documents/Projects/4. Projects, Potential/Python, Learn/python_work]
[path: /usr/bin:/bin:/usr/sbin:/sbin]
[Finished]

It looks as if the encoding used by python3 and Sublime Text 2 (particulary the left quotation mark) are different but I can’t figure out how to get around it.

Sorry if this is a newbie question but then again, I’m a newbie :slight_smile:

0 Likes

#2

ST2 is years old and unsupported, you should have better luck with ST3, and/or trying a simpler folder structure to store your python code in

0 Likes

#3

Thanks but I am stuck on Mac OS 10.6.3 for “reasons” and ST3 doesn’t run on that. I don’t expect support, I was just wondering if there is something obvious I am missing. The leading “u’” looks like python is choking on the UTF 8 smart quote character.

0 Likes

#4

From the looks of the error message you’re getting, the error isn’t that Python is mad, the error is that the OS is mad that you told it to run a program that doesn’t exist in the path, which is being displayed as the last part of the error diagnostics.

0 Likes

#5

Thank you! The Python 3 installer installed itself in /usr/local/bin. Changing the build file to:

“cmd”: ["/usr/local/bin/python3","-u","$file"]

fixed it. Three days. Arrrrrgh!

Thanks for taking the time to help. Your reward will be in the next life :slight_smile:

1 Like