Get the App
SLTechnology News&Howtos  ›  Development  › 

The solution of Code prompt Compiler error reporting in the era of Sublime Text4 configuration Python3 Environment

Shulou Source: shulou.com Published: 2022-06-02 03:58:01 10月16日 Update

Sublime Text4 configuration Python3 environment code prompt compilation error solution, in view of this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible method.

1 configure the Python3 environment

Click tools > compile system > New compilation system.

Pop up:

Replace the contents as follows:

{"cmd": ["G:\\ CodeTools\\ anaconda3\ python.exe", "- u", "$file"], "file_regex": "^ [] * File\" (. *?)\ ", line ([0-9] *)", "selector": "source.python", "encoding": "utf-8", "env": {"PYTHONIOENCODING": "utf8"}, "shell": "true"}

Replace the address in cmd with the program address of your Python3, for example, the program address of my Python3 is: "G:\\ CodeTools\\ anaconda3\\ python.exe"

Press Ctrl + S pop-up dialog box, you can change the file name to Python3 and its reserved file suffix, click Save

Click tools > compile system > Python3 after saving to select:

The default compilation shortcut is Ctrl + B test:

2 configure automatic code hints

Press Ctrl + Shift + P, enter install, and select the first press Enter:

Then enter anaconda to select the first press Enter:

After waiting for the installation to finish, pop up:

Restart the Sublime Text4 test and enter import + space to pop up:

Done.

3 compilation error

If you encounter the following error during compilation _ _ init__ () got an unexpected keyword argument 'kill_previous', click preferences > browse the plug-in directory.

Pop up the directory and delete the Default file:

Restart Sublime Text4 and compile again to solve the problem.

This is the solution to the problem of code prompt compilation error in the era of Sublime Text4 configuration Python3 environment. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.

Tags: Compile configure question method environment prompt address file system input time content tools more directory program help test solution easy Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Microsoft Shulou Information Shulou Technology Xiaomi