Sublime Text 3 builds a python development environment

Source: Internet
Author: User
Tags sublime text



Sublime Text 3 (abbreviation: ST3) is a very lightweight IDE, this post mainly describes how to build a python development environment (Windows 10) on ST3.



1. After downloading and installing ST3, the first thing to do is to install Packgage control, installed this can be used for ST3 with related development plug-in, in order to improve development efficiency. Please refer to the installation method of package control: Https://packagecontrol.io/installation.



2. After installing the package control, you can click CTRL + Shift + p to install the plugin interface and install the following plugin to ST3:


    • AUTOPEP8: A plug-in that regulates Python code to conform to the PEP8 programming style.
    • Anaconda Plug-In
    • Sublimecodeintel


3. Basically completed the installation of the above three plug-ins, you can write the following code and install CTRL + B for testing:

print ("hello Python")
If you can print the following results in the Console box, it means that running Python is no problem.

Of course, after completing the above installation, it is not enough to complete the entire environment. You need to configure some related configurations for anaconda and sublimecodeintel, as follows:

First, click Tools-> Build system-> New Build System. At this time, ST3 will open an edit page, enter the following code on the edit page, and save it to the window that pops up by default on the computer.

{
"encoding": "utf-8",
"working_dir": "$ file_path",
"shell_cmd": "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ python.exe -u \" $ file \ "",
"file_regex": "^ [] * File \" (... *?) \ ", line ([0-9] *)",
"selector": "source.python"

}
After completing the above operations, start to configure the Anaconda plug-in, click Preferences-> Package Settings-> Anaconda-> Setting-Default, open the Settings-Default edit page and find "python_interpreter": "python", change the following python to Path to store python3 or python2 yourself (configured as follows):

"python_interpreter": "F: /Users/JielongSSS/Anaconda3/python.exe",
After saving the above operations, open them in turn: Preferences-> Package Settings-> Anaconda-> Setting-User, enter the following code in the edit page:

{
    "anaconda_linting": false,
    "python_interpreter": "F: /Users/JielongSSS/Anaconda3/python.exe",
    "suppress_word_completions": true,
    "suppress_explicit_completions": true,
    "complete_parameters": true,
}
Finally, configure SublimeCodeIntel, click Preferences-> Package Settings-> SublimeCodeIntel-> Setting-User, and enter the following code in the editing interface (note that the following are all stored Python.exe and related folders under Windows Where you are, if you do n’t know where your python is, press and hold the Windows key + R to call up the input box, enter cmd in the input box to call up the terminal window, and type whereis python in the terminal window so that you can find Where Python was originally installed, if the computer itself is configured with the Anaconda environment, then find the location of your Anaconda yourself, and copy the relevant path and modify the location of the following code):

{
    "codeintel_language_settings": {
        "Python3": {
            "python3": "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ python.exe",
            "codeintel_scan_extra_dir": [
                "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ DLLs",
                "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ Lib",
                "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ Lib \\ site-packages",
                "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ Lib \\ idlelib",
                "F: \\ Users \\ JielongSSS \\ Anaconda3",
                "F: \\ Users \\ JielongSSS \\ Anaconda3 \\ Lib \\ *"
            ],
            "codeintel_scan_files_in_project": true,
            "codeintel_selected_catalogs": []
        },
    }
}
At this point, the basic development environment required on ST3 is completed.

Sublime Text 3 builds Python development environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.