Upgrade all specified packages to latest version

def upgrade_packages(self, packages):
        """ Upgrade all specified packages to latest version """

        print("Upgrading packages\n")

        package_list = []
        requirements = self._parse_requirements(packages.readlines())
        for (package, version) in requirements:
            package_list.append(package)

        if package_list:
            args = [
                "pip",
                "install",
                "-U",
            ]
            args.extend(package_list)
            subprocess.check_call(args)
        else:
            print("No packages to upgrade")