1.下載sublime3和python3(在騰訊軟件中心下載較快)
2.安裝
3.打開sublime ,tools->build system->new build system,在文件中寫入:
{ "encoding": "utf-8", "working_dir": "$file_path", "shell_cmd": "C:\\python36\\python.exe -u \"$file\"", "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", "selector": "source.python" }
shell_cmd是python的安裝路徑,注意按照格式來,然后ctrl+s,保存文件,去取名為python3.6
4.點擊build system 可以看到python3.6,選擇它,然后新建一個文件,ctrl+s把文件命名為hello.py,在文件輸入代碼:
print('hello world!')
然后ctrl+b運行,正常運行,至此第一步大功告成!
5.但是這樣的是沒有交互功能的,比如出現提示輸入,然后鍵盤輸入一個數,目前這個配置是無法做到的,我們要安裝一個插件
6.選擇tools->install package control,等待安裝成功
7.在pereference可以看到package control,然后點擊package control,在搜索框輸入install package
8.可能出現問題:https://www.jianshu.com/p/ceb68e69f1ad
9.搜索sublimeREPL
10.key blindings綁定F5
{ "keys":["f5"], "caption": "SublimeREPL: Python - RUN current file", "command": "run_existing_window_command", "args": {"id": "repl_python_run", "file": "config/Python/Main.sublime-menu"} }
11.代碼補全插件:sublimecodeINTEL