标签:load imp led hex import opener port http error
#安装GPG wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - #确保apt被设置为https源 sudo apt-get install apt-transport-https #选择稳定版本 echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list #安装sublime-text sudo apt-get update sudo apt-get install sublime-text
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)
重新启动SublimeText 3,然后使用快捷键Ctrl+Shift+p,在弹出的输入框中输入”Package Control”则可以看到Install Package的选项,选择它后一会儿(看左下角的状态)会弹出插件查询及安装窗口,输入想用的插件,选中回车即可。
标签:load imp led hex import opener port http error
原文地址:https://www.cnblogs.com/jiangfeilong/p/10660592.html