old school magic

機械学習に関する備忘録です。

MacのSublime Text 2でCtrl + Bでのビルドをpython3に変更する

homebrewでpython3をインストールして、コマンド名が"python3"になってくれてるとします。

1. 設定ファイルの表示

# メニューからPackageフォルダを(Finderで)表示する
"Preferences" -> "Browse Packages..."

# Finderから設定ファイルを開く
Python -> Python.sublime-build

2. 設定ファイルの変更
Python.sublime-buildを以下に変更

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

とりあえずPython3の設定はこれで完了...にします。
IPython Notebook とかはまた今度にします。