def install_dependencies(plugins_directory, ostream=sys.stdout):
plugin_directories = plugins_directory.realpath().dirs()<EOL>print(<NUM_LIT:50> * '<STR_LIT:*>', file=ostream)<EOL>print('<STR_LIT>', file=ostream)<EOL>print('<STR_LIT:\n>'.join(['<STR_LIT>'.format(p)<EOL>for p in plugin_directories]), file=ostream)<EOL>print('<STR_LIT:\n>' + <NUM_LIT:50> * '<STR_LIT:->' + '<STR_LIT:\n>', file=ostream)<EOL>for plugin_dir_i in plugin_directories:<EOL><INDENT>try:<EOL><INDENT>on_plugin_install(plugin_dir_i, ostream=ostream)<EOL><DEDENT>except RuntimeError as exception:<EOL><INDENT>print(exception)<EOL><DEDENT>print('<STR_LIT:\n>' + <NUM_LIT:50> * '<STR_LIT:->' + '<STR_LIT:\n>', file=ostream)<EOL><DEDENT>
Run ``on_plugin_install`` script for each plugin directory found in
specified plugins directory.

Parameters
----------
plugins_directory : str
    File system path to directory containing zero or more plugin
    subdirectories.
ostream : file-like
    Output stream for status messages (default: ``sys.stdout``).