Sublime Forum

Can't install package control on ubuntu machine

#1

I tried installing the package control plugin for sublime text, but it failed with the following error

import urllib2,os,hashlib; h = ‘eb2297e1a458f27d836c04bb0cbaf282’ + ‘d0e7a3098092775ccb37ca9d6b2e4b7d’; 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’)
Traceback (most recent call last):
File “”, line 1, in
File “.\urllib2.py”, line 126, in urlopen
File “.\urllib2.py”, line 391, in open
File “.\urllib2.py”, line 409, in _open
File “.\urllib2.py”, line 369, in _call_chain
File “.\urllib2.py”, line 1161, in http_open
File “.\urllib2.py”, line 1136, in do_open
urllib2.URLError: <urlopen error [Errno 113] No route to host>

0 Likes

#2

i saw the proxy were set which I unsetted., now the error is :

import urllib.request,os,hashlib; h = ‘eb2297e1a458f27d836c04bb0cbaf282’ + ‘d0e7a3098092775ccb37ca9d6b2e4b7d’; 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)
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named request

0 Likes