Mark
Mark

Reputation: 5108

Package Control: Install Package missing in Sublime Text 3

I'm trying to install the babel plugin for Sublime Text 3. I followed the instruction here: https://packagecontrol.io/installation

I restarted Sublime Text and when I hit ctrl + shift + p and type 'package' I should see 'Package Control: Install Package'. But this is not appearing in the list.

enter image description here

What can I do? I have already removed 'package_control' from the 'ignored_packages' setting...

I also tried downloading the zip file from https://github.com/babel/babel-sublime and placing in sublime-text-3/Installed Packages. Still no joy

Upvotes: 32

Views: 29695

Answers (11)

rutgoff
rutgoff

Reputation: 149

For those experiencing this issue on Mac OS Big Sur and above, this comment on the Github issue related to this explains the problem nicely: https://github.com/wbond/package_control/issues/1612#issuecomment-1229487685

And as @ddelange mentions the fix is to:

  • Stop Sublime Text
  • Run this in your terminal: ln -sf /usr/local/Cellar/[email protected]/1.1.1o/lib/libcrypto.dylib /usr/local/lib/
  • Start Sublime Text
  • Wait
  • PackageControl will update and then pop up a message that you need to restart again
  • Restart Sublime Text again
  • PackageControl will display it's changelog/update notes/etc
  • The commands in the command palette will be back

Upvotes: 8

ddelange
ddelange

Reputation: 1595

After inspecting the console (View > Show Console) after Sublime had started up, I saw an error in the console:

Package Control.package_control.deps.oscrypto._ffi.FFIEngineError: Error initializing ctypes

After searching for that error, I found a potential solution that worked for me:

  • Close Sublime
  • Run the following command in a terminal
  • Start Sublime
  • Package Control starts updating packages etc, commands are visible again in Command Palette
ln -sf /usr/local/Cellar/[email protected]/1.1.1o/lib/libcrypto.dylib /usr/local/lib/

Upvotes: 2

Doyle B
Doyle B

Reputation: 174

Upgrade to Package Control 4.0 (see link):

  • In case PC3.x is not working, you can download PC4.0 beta.
  • Go to Main Menu > Preferences > Browse Packages...
  • Navigate to to: ../Installed Packages
  • Move downloaded package into Installed Packages and rename it to Package Control.sublime-package (replace the first . with a space).

Upvotes: 7

Tenzin Chemi
Tenzin Chemi

Reputation: 5891

Do a clean uninstall if you don't have much to lose. And then re-install.

For me the issue was that I have upgraded my Mac OS, and it looks like some parts of Sublime did not work smoothly. After uninstalling and reinstalling, it worked a like a charm.

If you're on mac, AppCleaner app is quite good for uninstalling.

Upvotes: 0

Nikita Belonogov
Nikita Belonogov

Reputation: 1

Had the same issue, though "Package Control" was not ignored in settings. So I just manually reinstalled "Package Control" by downloading it and replacing it in the 'Installed Packages/' folder. https://packagecontrol.io/installation#Manual

Upvotes: 0

Er Pkumar soni
Er Pkumar soni

Reputation: 318

The simplest method of installation is through the Sublime Text console. The console is accessed via the CTRL + ` shortcut or the View > Show Console menu. Once open, paste the appropriate Python code for your version of Sublime Text into the console.

SUBLIME TEXT #

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)

SUBLIME TEXT 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')

Upvotes: 3

Chud37
Chud37

Reputation: 5027

For anyone coming across this, We had a user in the office who had a problem whereby they could see the 'Install Package' but it was not working. The problem was, the files in /home/user/.config/sublime-text-3 had only root permissions. So when we tried to run install package, it failed, and no error came up.

running rm -rf /home/user/.config/sublime-text-3/ solved the problem. We uninstalled Sublime3 first then ran that command then reinstalled, bingo, all working perferectly.

If that isn't your problem, its worth having the console open while you are trying to do whatever you're trying to do and see the error messages popping up. Console can be opened with CTRL+`

Hope that helps someone.

Upvotes: 1

hbo
hbo

Reputation: 639

Following the instructions from this article has fixed the problem for me.

In a nutshell:

  • Preference -> Settings
  • Remove "Package Control" from the ignored_packages entries (heads up for commas if it is the last entry)
  • Restart Sublime

Upvotes: 48

Bishnupada Nandi
Bishnupada Nandi

Reputation: 11

Please follow the below process. Open Sublime and go to View->Show console

Then past the code in text box and enter.

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)

Reference Link: https://packagecontrol.io/installation

Upvotes: 1

StefansArya
StefansArya

Reputation: 2898

Try follow these steps:

  1. Go to the configuration folder by opening preferences menu and Browse Package.
  2. Rename whole configuration "Sublime Text 3" folder to "Sublime Text 3 - Backup".
  3. Uninstall Sublime text 3
  4. Install Sublime text 3 with this guide and run it without registering.. You may find Package Control now..
  5. Restore your old configuration on Sublime Text 3 - Backup if needed

Upvotes: 2

hafizhanindito
hafizhanindito

Reputation: 447

This is a common enough bug in sublime. Have you seen this issue in github?:

Package Control not showing in sublime 3

Commonly, removing package control from the ignored list would suffice, but from your case, it seems that package control is not installed properly. In that case, try to reinstall the package control and see the console for any error.

Upvotes: 2

Related Questions