watex.utils.funcutils.is_installing#

watex.utils.funcutils.is_installing(module, upgrade=True, action=True, DEVNULL=False, verbose=0, **subpkws)[source]#

Install or uninstall a module/package using the subprocess under the hood.

Parameters
  • module (str,) – the module or library name to install using Python Index Package PIP

  • upgrade (bool,) – install the lastest version of the package. default is True.

  • DEVNULL (bool,) – decline the stdoutput the message in the console

  • action (str,bool) – Action to perform. ‘install’ or ‘uninstall’ a package. default is True which means ‘intall’.

  • verbose (int, Optional) – Control the verbosity i.e output a message. High level means more messages. default is 0.

  • subpkws (dict,) – additional subprocess keywords arguments

Returns

success – whether the package is sucessfully installed or not.

Return type

bool

Example

>>> from watex import is_installing
>>> is_installing(
    'tqdm', action ='install', DEVNULL=True, verbose =1)
>>> is_installing(
    'tqdm', action ='uninstall', verbose =1)