Sublime Forum

How do I setup Python3.3 and Sublime Text 2 correctly OSX

#1

I am trying to setup Sublime Text 2 so that the build command correctly runs Python3 / Python3.3 scripts.

I have installed Python 3.3 via the installer obtained from python.org and installed Sublime Text 2 via the Sublime Text 2 installer.

Following this I added a custom build entry called:

Python3.sublime-build
into Sublime Text 2’s Python folder with the following contents:

{ "cmd": "python3", "-u", "$file"], "file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python" }

I’m getting the following error when trying to run the script:

[Errno 2] No such file or directory [cmd: [u'python3', u'-u', u'/Users/user/Library/Application Support/Sublime Text 2/Packages/Python/Python3.sublime-build']] [dir: /Users/user/Library/Application Support/Sublime Text 2/Packages/Python] [path: /usr/bin:/bin:/usr/sbin:/sbin] [Finished]

I have read somewhere that symlinkng python3 from /usr/bin might fix the issue but after creating the symlink in /usr/bin through Finder, Sublime Text still cannot build as it gets a permissions error.

What is the best way to set Sublime Text 2 up to allow for running Python3 scripts?

I have asked this question to askdifferent as will, question is at the link below.

http://apple.stackexchange.com/questions/70330/how-do-i-setup-python3-3-and-sublime-text-2-correctly-on-os-x-10-8-2

Don’t know if this is the neatest way but I ended up just linking to /usr/local/bin/python3

{ "cmd": "/usr/local/bin/python3", "-u", "$file"], "file_regex": "^ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python" }

0 Likes