一.在線安裝python
1.打開sublime,Ctrl+` 打開控制檯, 輸入json
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)
2.注意:因爲網絡問題,在線安裝通常不會成功網絡
二.離線安裝ui
1.下載Package Control.sublime-package 安裝包url
若是不能訪問請點擊此鏈接 密碼:zxw7spa
2.找到sublime安裝目錄下的Installed Packages,將下載好的安裝包放到該目錄下3d
mac的sublime安裝目錄默認爲 /Users/{用戶名}/Library/Application Support/Sublime Text 3/code
3.重啓sublime, 安裝成功blog
三報錯ip
報錯信息
Package Control: Error downloading channel. URL error [Errno 65] No route to host downloading https://packagecontrol.io/channel_v3.json
解決
打開 : Preferences
> Package Settings
> Package Control
> Settings - User
由 https://packagecontrol.io/channel_v3.json 改成 http://static.bolin.site/channel_v3.json
重啓sublime, 完美解決
若有問題 歡迎交流