protected static void initEnvironment(Project project,
                                        SdkAdditionalData data,
                                        GeneralCommandLine commandLine,
                                        PythonRunParams runParams,
                                        boolean isDebug) {
    Map<String, String> env = Maps.newHashMap();

    setupEncodingEnvs(env, commandLine.getCharset());

    if (runParams.getEnvs() != null) {
      env.putAll(runParams.getEnvs());
    }
    addCommonEnvironmentVariables(getInterpreterPath(project, runParams), env, true);

    setupVirtualEnvVariables(runParams, env, runParams.getSdkHome());

    commandLine.getEnvironment().clear();
    commandLine.getEnvironment().putAll(env);
    commandLine.withParentEnvironmentType(runParams.isPassParentEnvs() ? ParentEnvironmentType.CONSOLE : ParentEnvironmentType.NONE);

    buildPythonPath(project, commandLine, runParams, isDebug);

    for (PythonCommandLineEnvironmentProvider envProvider : PythonCommandLineEnvironmentProvider.EP_NAME.getExtensionList()) {
      envProvider.extendEnvironment(project, data, commandLine, runParams);
    }
  }
protected static void initEnvironment(Project project,
                                        SdkAdditionalData data,
                                        GeneralCommandLine commandLine,
                                        PythonRunParams runParams,
                                        boolean isDebug)