void (PythonRunParams myConfig, Map<String, String> env, String sdkHome) { Sdk sdk = PythonSdkUtil.findSdkByPath(sdkHome); if (sdk != null && (Registry.is("python.activate.virtualenv.on.run") && PythonSdkUtil.isVirtualEnv(sdkHome) || PythonSdkUtil.isConda(sdk))) { Map<String, String> environment = PySdkUtil.activateVirtualEnv(sdk); env.putAll(environment); for (Map.Entry<String, String> e : myConfig.getEnvs().entrySet()) { if (environment.containsKey(e.getKey())) { if ("PATH".equals(e.getKey())) { env.put(e.getKey(), PythonEnvUtil.addToPathEnvVar(env.get("PATH"), e.getValue(), true)); } else { env.put(e.getKey(), e.getValue()); } } } } }