Home > Development Tools > sublime > How to solve the problem that sublime text 3 cannot install Package Control

How to solve the problem that sublime text 3 cannot install Package Control

藏色散人
Release: 2020-11-26 11:49:29
forward
5011 people have browsed it

The following tutorial column of sublime will introduce to you the solution to the problem that sublime text 3 cannot install Package Control. I hope it will be helpful to friends in need!

How to solve the problem that sublime text 3 cannot install Package Control

***About sublime text 3 commonly used Package Control plug-in installation methods***

1. CTRL ` (under the ese button), open the sublime command input box, paste the following code into the command line, and enter directly to execute:

sublime text 3

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)
Copy after login

sublime text 2

  import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; pf = 'Package Control.sublime-package'; ipp =     sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by        = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh ==       h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish                   installation')
Copy after login

2. Enter and wait for the installation. After the installation is complete, restart sublime, 'ctrl shift p' to open the package, enter install package After execution If no error is reported, it means success. Then enter the desired plug-in to install it. After installation, restart sublime in the same way. At this point, this is the commonly used method to install package control plug-ins.

3. Manual installation method of the package control plug-in in the new version of sublime:

①sublime text 3 download address: http://www.sublimetext.com/;

②After installing sublime, use the same CTRL ` (under the ese button) to open the sublime command input box, paste the above code for installing the package control plug-in into the command line, and enter directly to execute it. At this time you will see This string of code is not executed. In order to verify the reliability, close sublime, restart sublime, 'ctrl shift p' to open the package, enter install package. After execution, you will see the following error:

③If you see the above error message, it means that our automatic installation failed. At this time, we need to perform manual installation. The specific operations are as follows: Enter the page and click the red box Download the plug-in to the desktop (easier to find), and attach the download address: https://packagecontrol.io/installation#st3

④After the download is completed, open the installation package of sublime text 3, find the sublime text => Packages folder, copy the package control plug-in we downloaded in the picture above to this file, and then re-run sublime, the same 'ctrl shift p' Open the package and enter install package to execute. You will not see the error in step 2. Then enter the plug-in you want to install and enter to run.

4. Update: https://packagecontrol.io/installation#st3 connection failure handling plan:

①Go to Corresponding GiiHub address: https://github.com/wbond/package_control, download the package control package

②Extract the downloaded package and name it 'Package Control', Open the sublime plug-in storage address from the screenshot, return to the upper directory, find "\Sublime Text 3\Installed Packages", copy the Package Control package to the Installed Packages folder and restart sublime

The above is the detailed content of How to solve the problem that sublime text 3 cannot install Package Control. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:cnblogs.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template