private static void buildPythonPath(
     Project project, GeneralCommandLine commandLine, PythonRunParams config) {
   Sdk pythonSdk = PythonSdkType.findSdkByPath(config.getSdkHome());
   if (pythonSdk != null) {
     List<String> pathList = Lists.newArrayList(getAddedPaths(pythonSdk));
     pathList.addAll(collectPythonPath(project, config));
     initPythonPath(commandLine, config.isPassParentEnvs(), pathList, config.getSdkHome());
   }
 }
  protected static void initEnvironment(
      Project project, GeneralCommandLine commandLine, PythonRunParams myConfig) {
    Map<String, String> env = myConfig.getEnvs();
    if (env == null) {
      env = new HashMap<String, String>();
    } else {
      env = new HashMap<String, String>(env);
    }

    setupEncodingEnvs(env, commandLine.getCharset());

    addCommonEnvironmentVariables(env);

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

    buildPythonPath(project, commandLine, myConfig);
  }