sublime3安装package controller遇到的问题

1. 通过ctrl+shift+p 输入 PCI找到install package controller 直接安装,如果没有这个选项进入步骤二

 

2.  快捷键ctrl+` 通过命令安装packageControl

  命令是:

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) 

如果报找 ..\AppData\Roaming\Sublime Text 3\Installed Packages文件 file is not zip file 则进入步骤三

 

3.  替换 ..\AppData\Roaming\Sublime Text 3\Installed Packages 下的Package Control.sublime-package 文件,可以去网上下载

 

4.  通过ctrl+shift+p 找到 install package 即可安装,如果出现there are no packages available for installion异常,进入步骤五

 

5. 修改Perferences -> package setting -> package controller -> setting User 中添加以下代码,如果没有channel_v3.json下载

"channels":[

  "D:/Program Files/Sublime Text 3/channel_v3.json" (即channel_v3.json文件路劲)

],

 

6. 继续步骤四即可安装成功

ctrl+shift+p

posted @ 2019-05-31 11:39  MrLiub  阅读(1086)  评论(0编辑  收藏  举报