void (@NotNull ConfiguratorContext context) { final CommandLineInspectionProgressReporter logger = context.getLogger(); logger.reportMessage(3, "Python environment configuration..."); final List<Sdk> sdks = PythonSdkUtil.getAllSdks(); logSdks(logger, sdks, "Already configured Python interpreters:"); if (sdks.isEmpty()) { logger.reportMessage(3, "No previously configured Python interpreters, detecting..."); final List<Sdk> detectedSdks = PySdkExtKt.findAllPythonSdks(context.getProjectPath()); logSdks(logger, detectedSdks, "Python interpreters detected:"); if (!detectedSdks.isEmpty()) { final Sdk detectedSdk = detectedSdks.get(0); final Sdk sdk = configureSdk(detectedSdk); if (sdk != null) { logger.reportMessage(3, "Python interpreter has been configured: " + sdk.getHomePath()); } else { logger.reportMessage(1, "Can't configure Python interpreter: " + detectedSdk.getHomePath()); } } else { logger.reportMessage(1, "Can't find Python interpreter"); } } }