I want to install Babel. I'm using a Mac, I already have Sublime Text 3 and Package Controll newly installed. So I tried cmd+shift+p to open up Package Controll and I typed "Install" but nothing shows up. I was following this link. I need Babel for React syntax highlighting.
-
O.k since I misunderstood, you **do** get the command palette to open with no problems right? – Dimitris Fasarakis Hilliard Sep 23 '15 at 17:00
-
Yes, It looks like a search box. I'm assuming that is the command palette. I also tried opening command palette manually by going to `Tools` --> `Command Palette` it opens the same grey box that looks like a search box. – Sep 23 '15 at 17:03
-
Exactly. Do you see any relevant results if you type in **Package Control**? – Dimitris Fasarakis Hilliard Sep 23 '15 at 17:04
-
Nope. No relevant searches come up when I type **Package Control** or **Install** – Sep 23 '15 at 17:10
4 Answers
You can install the Babel Package by following the below steps.
1.open the url
-> https://packagecontrol.io/installation
then copy the code in that page like this
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)
Note: The above code will be updated frequently
2.Open Sublime text editor and "Goto View option and select Show Console"
3.Paste the above code the console and press enter
4.press command+shift+p to bring up the Command Palette
5.In that search box type the text as "Package Control" and select the "Package Control:Install Package" option
-> A new search box with options will come.
6.Type the text “Babel” and select the Babel in the list. It will install the babel package.
7.To Activate the Babel Syntax for the js file
-> View -> Syntax -> Babel
Note: To open all of the folder files with the babel syntax
-> Goto View -> Syntax -> Open all with current extention as JavaScript -> Babel

- 4,710
- 4
- 23
- 22
You might what to check the file path of where Sublime 3 was placed. Did you sudo install? Perhaps this link will help.

- 3,761
- 8
- 29
- 58
-
I get this error: `ImportError: No module named 'urllib2'` when I try running the second block of code in [this link](https://packagecontrol.io/installation#ST3) – Sep 23 '15 at 17:08
-
Do you have any other packages? Cmd+shift+p and the type in list. Should give other packets. Also have you tried reinstalling sublime? – alphapilgrim Sep 23 '15 at 17:28
Had the same issue, in my case I had to install package control first, I used "simple installation" method by pasting the code from Package.io into the console (View > Show Console).
For Sublime 3:
import urllib.request,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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)
and for Sublime 2:
import urllib2,os,hashlib; h = '2915d1851351e5ee549c20394736b442' + '8bc59f460fa1548d1514676163dafc88'; 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')

- 21
- 2
Manually : For Babel-sublime
If for some reason the console installation instructions do not work for you (such as having a proxy on your network), perform the following steps to manually install Package Control:
1)Preferences > Browse Packages
Browse up a folder and then into the folder Download Package Control.sublime-package and copy it into the Installed Packages/ directory.
For Sublime 2
import urllib2,os,hashlib; h = '6f4c264a24d933ce70df5dedcf1dcaee' + 'ebe013ee18cced0ef93d5f746d80ef60'; 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')
For Sublime 3
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)
And Restart Sublime Text
Want More inforfation click here

- 353
- 1
- 8