Cheap VPS host selection
Provide server host evaluation information

How to configure the python environment for the subordinate text (the method of configuring the python environment for the subordinate text)

Sublime Text is an efficient text editor and one of the tools commonly used by Python developers. The following is the method to configure the Python environment in Sublime Text:

  1. Install the Python interpreter. Download and install the latest version of the Python interpreter, and add it to the system environment variable.
  2. Install Package Control. Open Sublime Text, press the ` Ctrl+"key or click the" View ->Show Console "option, enter the following command and press Enter:
     import urllib.request,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60' ;  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( 'Error validating download (got %s instead of %s),  please try           manual install' % (dh, h)) if dh != h else  open (os.path. join ( ipp, pf), 'wb' ). write ( by )
  3. Install the SublimeREPL plug-in. Open Package Control (Ctrl+Shift+P), enter "install package" and select the "Package Control: Install Package" option. Then search for "SublimeREPL" and install the plug-in.
  4. Configure the SublimeREPL plug-in. Open the SublimeREPL plug-in configuration file (Preferences ->Package Settings ->SublimeREPL ->Settings – User), and enter the following:
     { "default_extend_env" : { "PATH" : "{PATH}:C: \\ Python \\ Python38-32" } }

    Where, "C: Python Python 38-32" is the path where you install the Python interpreter. Please change the path according to the actual situation.

  5. Configure the Sublime Text build system. Open Sublime Text and click the "Tools ->Build System ->New Build System" option. Enter the following in a new window:
     { "cmd" : [ "python" , "-u" , " $file " ], "file_regex" : "^[ ]*File \" (...*?)\ ", line ([0-9]*)" , "selector" : "source.python" }
  6. Save the build system as Python. public build and close the window.
  7. Write Python code in Sublime Text and try running it. You can press the Ctrl+B shortcut key or click the Tools ->Build option to execute the code and view the output results.

Note: The above steps are based on the Windows operating system. If you are using a macOS or Linux operating system, modify the path and command line parameters to the syntax appropriate to your operating system.

Do not reprint without permission: Cheap VPS evaluation » How to configure the python environment for the subordinate text (the method of configuring the python environment for the subordinate text)