python 3.x - ImportError: No module named 'urllib2' when installing Package Manager in Sublime Text 3 -
i'm trying install sublime package control explained here http://wbond.net/sublime_packages/package_control/installation error:
traceback (most recent call last): file "<string>", line 1, in <module> importerror: no module named 'urllib2'
there answer related problem (python 3.2 unable import urllib2 (importerror: no module named urllib2)) doesn't explain how solve it, user posted link explaining why problem appears. how use info solve problem?
this command installation:
import urllib2,os; 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())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print('please restart sublime text finish installation')
what should replace urllib2
succeed installation?
it appears followed instructions installing on sublime text 2. on sublime text 3 must install using git
. instructions site follows:
cd packages/ git clone https://github.com/wbond/sublime_package_control.git "package control" cd "package control" git checkout python3
note: packages/
folder on first line refers folder opens when use preferences > browse packages… menu.
here link relavant section of page
Comments
Post a Comment