Sublime Forum

How to check whether particular plugin is already installed or not?

#1

Is there any method exist in sublime apis to check for particular plugin whether it is currently installed or not

0 Likes

#2

sry misread the topic :slight_smile:

0 Likes

#3
try:
    import BracketHighlighter

    is_plugin_installed = True
except ImportError:
    is_plugin_installed = False
import importlib

module_loader = importlib.find_loader('BracketHighlighter')
is_plugin_installed = module_loader is not None

# from https://stackoverflow.com/questions/14050281/how-to-check-if-a-python-module-exists-without-importing-it
1 Like