from avocado.utils.software_manager import SoftwareManager mgr = SoftwareManager() if mgr.is_installed('foo'): print('Package foo is installed') else: print('Package foo is not installed')
from avocado.utils.software_manager import SoftwareManager mgr = SoftwareManager() pkg = mgr.install('foo') print('Installed package:', pkg.name)
from avocado.utils.software_manager import SoftwareManager mgr = SoftwareManager() pkg = mgr.remove('foo') print('Removed package:', pkg.name)Overall, the avocado.utils.software_manager package library is a useful tool for managing software packages in a Python application.