install_packages util function