void (@NotNull final String frameworkName, boolean forceInstallFramework, @NotNull ProgressIndicator indicator, @NotNull final String requirement, @NotNull final Sdk sdk) { final PyPackageManager packageManager = PyPackageManager.getInstance(sdk); boolean installed = false; if (!forceInstallFramework) { // First check if we need to do it indicator.setText(PyBundle.message("python.install.framework.checking.is.installed", frameworkName)); final List<PyPackage> packages = PyPackageUtil.refreshAndGetPackagesModally(sdk); installed = PyPsiPackageUtil.findPackage(packages, requirement) != null; } if (!installed) { indicator.setText(PyBundle.message("python.install.framework.installing", frameworkName)); try { packageManager.install(requirement); packageManager.refresh(); } catch (final ExecutionException e) { reportPackageInstallationFailure(requirement, Pair.create(sdk, e)); } } }