private static void installPackages(final @NotNull String frameworkName,
                                      boolean forceInstallFramework,
                                      @NotNull ProgressIndicator indicator,
                                      final @NotNull String requirement,
                                      final @NotNull 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));
      }
    }
  }
private static void installPackages(final @NotNull String frameworkName,
                                      boolean forceInstallFramework,
                                      @NotNull ProgressIndicator indicator,
                                      final @NotNull String requirement,
                                      final @NotNull Sdk sdk)