private static PythonInterpreterInformation CreateEnvironmentInfo(string interpreterPath)
        {
            if (!File.Exists(interpreterPath))
            {
                return(null);
            }

            var prefixPath = PrefixFromSysPrefix(interpreterPath);

            if (prefixPath == null)
            {
                return(null);
            }

            var arch    = CPythonInterpreterFactoryProvider.ArchitectureFromExe(interpreterPath);
            var version = CPythonInterpreterFactoryProvider.VersionFromSysVersionInfo(interpreterPath);

            try {
                version.ToLanguageVersion();
            } catch (InvalidOperationException) {
                version = new Version(0, 0);
            }

            var name                   = Path.GetFileName(prefixPath);
            var description            = name;
            var vendor                 = Strings.WorkspaceEnvironmentDescription;
            var vendorUrl              = string.Empty;
            var supportUrl             = string.Empty;
            var windowsInterpreterPath = Path.Combine(Path.GetDirectoryName(interpreterPath), WorkspaceInterpreterFactoryConstants.WindowsExecutable);

            if (!File.Exists(windowsInterpreterPath))
            {
                windowsInterpreterPath = string.Empty;
            }

            var config = new VisualStudioInterpreterConfiguration(
                WorkspaceInterpreterFactoryConstants.GetInterpreterId(WorkspaceInterpreterFactoryConstants.EnvironmentCompanyName, name),
                description,
                prefixPath,
                interpreterPath,
                windowsInterpreterPath,
                WorkspaceInterpreterFactoryConstants.PathEnvironmentVariableName,
                arch,
                version,
                InterpreterUIMode.CannotBeDefault | InterpreterUIMode.CannotBeConfigured
                );

            config.SwitchToFullDescription();

            var unique = new PythonInterpreterInformation(
                config,
                vendor,
                vendorUrl,
                supportUrl
                );

            return(unique);
        }
        private static PythonInterpreterInformation CreateEnvironmentInfo(string prefixPath)
        {
            var name                   = Path.GetFileName(prefixPath);
            var description            = name;
            var vendor                 = Strings.CondaEnvironmentDescription;
            var vendorUrl              = string.Empty;
            var supportUrl             = string.Empty;
            var interpreterPath        = Path.Combine(prefixPath, CondaEnvironmentFactoryConstants.ConsoleExecutable);
            var windowsInterpreterPath = Path.Combine(prefixPath, CondaEnvironmentFactoryConstants.WindowsExecutable);

            if (!File.Exists(interpreterPath))
            {
                return(null);
            }

            var arch    = CPythonInterpreterFactoryProvider.ArchitectureFromExe(interpreterPath);
            var version = CPythonInterpreterFactoryProvider.VersionFromSysVersionInfo(interpreterPath);

            var config = new VisualStudioInterpreterConfiguration(
                CondaEnvironmentFactoryConstants.GetInterpreterId(CondaEnvironmentFactoryProvider.EnvironmentCompanyName, name),
                description,
                prefixPath,
                interpreterPath,
                windowsInterpreterPath,
                CondaEnvironmentFactoryConstants.PathEnvironmentVariableName,
                arch,
                version
                );

            config.SwitchToFullDescription();

            var unique = new PythonInterpreterInformation(
                config,
                vendor,
                vendorUrl,
                supportUrl
                );

            return(unique);
        }