Sublime Text 3 Mac how to configure the Python environment and install the plug?

sublime text 3 crack is a very suitable platform on mac code editor application developer to use, set the group windows, project management, extension tools, code folding and a variety of functions, supports syntax highlighting for multiple programming languages with good code completion, also has code snippets (snippet) functionality, support VIM model to help editors improve the efficiency of the code editor. Then begin to address Mac Sublime Text 3 how to configure the Python environment and install the plug?

First, download and install Sublime Text 3 mac Chinese crack version, click on the bottom blue font can be installed!
Second, configure the development environment Python
1. Click the lower right corner, select python

2. Add the compiler environment python3.6
my default Mac version is python2.7, python3.6 installed, and now you want to configure using python3.6 compiler environment Sublime Text
Tools -> Build System -> New Build System
in the opened file paste the following code
{
"cmd": [ "/Library/Frameworks/Python.framework/Versions/3.6/bin/python3", "-u", "$ File"],
"file_regex": "^ [] * File \ "(? ... *) \", Line ([0-9] *) ",
" Selector ":" source.python "
}
remember the python path in the code above into your path to
save the file to the file Python3 such as a name, do not change the suffix, saved in the default location to
Tools -> select the build environment you just set up under Build System, just the file name to select Python3 called Python3 slightly.
3. The test environment is correct
knock sublime text in print ( 'hello'), Save, compile command + B
print hello that success
Third, install Sublime Text Python plug
1.

View-> Show Console menu command to open, that paste the following code in the bottom line:
Import the urllib.request, OS; PF = 'Control.sublime the Package-Package'; sublime.installed_packages_path IPP = (); urllib.request.install_opener (urllib.request.build_opener (urllib.request.ProxyHandler ())) ; open (os.path.join (ipp, pf), 'wb') write (urllib.request.urlopen ( 'http: // sublime.. wbond.net/ '+ pf.replace (' ', '% 20 ')). read ())
click return run.
If Sublime Text - there are options under Package Control> Preferences, explained Package Control has been successfully installed.
2. Install the plug-in
open Sublime Text -> Preferences-> Package Control
Select: Package Control: Install Package

The following interface

输入你需要的插件如Anaconda,选择下面出现的插件,即可安装。
a.插件Anaconda
Anaconda:Anaconda是一个用于科学计算的Python发行版,支持 Linux, Mac, Windows系统,提供了包管理与环境管理的功能,可以很方便地解决多版本python并存、切换以及各种第三方包安装问题。Anaconda利用工具/命令conda来进行package和environment的管理,并且已经包含了Python和相关的配套工具。
配置Anaconda: 进入Sublime Text-> preferences -> package Settings-> Anaconda -> Settings-Default , 选择Settings-Default选项,搜寻“python_interpreter” key,然后更改key值, key值是Python的路径(终端输入which python查看mac自带python路径,输入which python3查看你安装的python3的路径), 比如: “/usr/local/bin/python3” , 然后, 编译时选python就能用了
如果是因为使用anaconda插件而出现这些框框,可以在可以在 Sublime > Preferences > Package Settings > Anaconda > Settings User 中设置关闭: {"anaconda_linting": false}
b.自动补全插件SublimeCodeIntel
Python自动补全插件,装好之后, Sublime Text-> preferences -> package Settings下面会多出SublimeCodeIntel选项
c.交互、逐行运行插件SublimeREPL

以上就是小编带来的sublime text3 mac如何配置Python环境及安装插件的教程,希望对大家有所帮助!

Guess you like

Origin www.cnblogs.com/milimac123/p/11128013.html