sublime text3配置Python3

1.下载sublime3和安装

2.安装Python或Anaconda

3.打开sublime ,tools->build system->new build system,在文件中写入:

1
2
3
4
5
6
7
{
    "encoding""utf-8",
    "working_dir""$file_path",
    "shell_cmd""Python路径\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,在文件输入代码:

1
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

1
2
3
4
5
6
{
"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

posted @ 2019-08-02 15:11  相文  阅读(343)  评论(0编辑  收藏  举报