安装Package Control
点击Perference菜单,如果出现Package Control 与Package Settings 两个子菜单,则说明已安装。
否则,简单通过以下方法安装:
1、打开命令行(Ctrl + `),在命令行输入
import urllib.request,os,hashlib;
h = '7183a2d3e96f11eeadd761d777e62404e330c659d4bb41d3bdf022e94cab3cd0';
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://sublime.wbond.net/' + 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)
版权声明:本文为qq_27838031原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。