void (@NotNull final Sdk sdk) { final PyPackageManagerUI ui = new PyPackageManagerUI(myProject, sdk, new PyPackageManagerUI.Listener() { @Override public void started() { myPackagesTable.setPaintBusy(true); } @Override public void finished(List<ExecutionException> exceptions) { myPackagesTable.setPaintBusy(false); PyPackageManager packageManager = PyPackageManager.getInstance(sdk); final PyPackageManagementService.PyPackageInstallationErrorDescription description = PyPackageManagementService.toErrorDescription(exceptions, sdk, "packaging tools"); if (description != null) { PyPackagesNotificationPanel.showPackageInstallationError( PyBundle.message("python.packaging.failed.to.install.packaging.tools.title"), description); } packageManager.refresh(); updatePackages(PyPackageManagers.getInstance().getManagementService(myProject, sdk)); updateNotifications(sdk); } }); ui.installManagement(); }