How do I setup Python3.3 and Sublime Text 2 correctly on OS X 10.8.2?

Add "path": "/Library/Frameworks/Python.framework/Versions/3.3/bin/" to your Python3 build file. Mine looks like this:

{
    "cmd": ["python3", "-u", "$file"],
    "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
    "selector": "source.python",
    "encoding": "utf8",
    "path": "/Library/Frameworks/Python.framework/Versions/3.3/bin/"
}

Note: Make sure the path to Python3 is relative to your machine - that was true for mine


I gave the complete path to python3 to get this to work:

{
  "cmd" : ["/usr/local/bin/python3", "-u", "$file"],
}

The issue is the normal OSX one that GUI Applications do not read your shell profiles etc and so just have the path inherited from the Workspace.

The way to fix this is to add the path in ~/.MacOSX/environment.plist

That is add a key string pair for PATH e.g.

<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

  <key>PATH</key>
  <string>/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/libexec/binutils:</string>
</dict>
</plist>

You will need to logout and login or possibly reboot for this to work.