Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use sublime to build Python running Environment under window

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to use sublime to build a Python operating environment under window. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

Software download

It is recommended that you use Bing search sublime to download it on the official website. Pay attention to the following two points during installation.

Do not have a Chinese directory in the installation path

To install Sublime Text 3, check "Add to explorer context menu" to add to the right mouse button and open it using sublime.

Install Package Control

After installing package control, you can use it to install other plug-ins. It is recommended that you take a look at the official tutorial of sublime. Open the console with the shortcut key [ctrl+ `] or the "View > Show Console" menu, and paste the following Python code into the console.

Source of the tutorial: https://www.toutiao.com/i6711082703753593357/

Import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaeeseaebe013ee18cced0ef93d5f746d80ef60; pf =' Package Control.sublime-package'; ipp = sublime.installed_packages_path (); urllib.request.install_opener (urllib.request.build_opener (urllib.request.ProxyHandler ()); by = urllib.request.urlopen ('http://packagecontrol.io/'+ pf.replace ('','% 20')). Read (); dh = hashlib.sha256 (by). Hexdigest (); print ('verify download error (get% s instead of% s), please try to install'% (dh,h) manually) if dh! = h, open (os.path.join (ipp,pf), 'wb') .WRITE (through)

As shown in the figure:

Of course, you can also choose the way of this article (my reference)

Https://www.toutiao.com/a6688123640501764611/

Install the Chinese plug-in

Many partners who use piracy are Chinese-oriented, but piracy cannot guarantee the security and update of the software. The most important thing is to install plug-ins can be Chinese, no piracy!

Open the console through the shortcut key [ctrl+shift+p] menu

Enter install and select the associated install package. After execution, the following situation occurs, indicating success.

Install the Chinese plug-in ChineseLocalizations or enter the keyword chinese to see other

Chinese plug-in (restart after saving)

Configure the Python runtime environment

Open Tools > Build System

Just select python.

Install the SublimeREPL plug-in

Because running the Python program in sublime can only output the results and there is no input in the input statement, you need to install the SublimeREPL plug-in.

Open the console through the shortcut key [ctrl+shift+p] menu

Enter install and select the associated install package

Install the plug-in sublimerepl

View the sublimerepl installation by viewing the preference package setting

Set keyboard shortcuts

Preferences-> Shortcut

[

{

"keys": ["f5"]

"caption": "SublimeREPL: Python-RUN current file"

"command": "run_existing_window_command"

"args": {

"id": "repl_python_run"

"file": "config/Python/Main.sublime-menu"

}

}

]

You can run py programs quickly with F5

The above content is how to use sublime to build Python operating environment under window. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report