From c2bf0832858ff27672379d208fad0a8e1ab08235 Mon Sep 17 00:00:00 2001 From: FrederikJA Date: Fri, 23 Jan 2026 14:50:17 +0100 Subject: [PATCH 1/2] Add python discovery path --- OpenTap.Python/PythonInstallationDiscoverer.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index d3bed78..8ebb885 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -75,7 +75,8 @@ static IEnumerable GetPythonsInFolder(string folderPath) List pys = new List(); foreach (var dir in Directory.GetDirectories(folderPath)) { - if (Path.GetFileName(dir).Contains("Python")) + string fileName = Path.GetFileName(dir); + if (fileName.ToLower().Contains("python")) { pys.Add(dir); } @@ -101,8 +102,10 @@ static IEnumerable LocatePythonsWin32() var programFiles5 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Programs", "Python"); var programFiles6 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); + var programFiles7 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), + "Python"); //C:\Users\fredandr\AppData\Local\Python\bin - return drives.Concat(new[] { programFiles, programFiles6, programFiles2, programFiles3, programFiles4, programFiles5 }) + return drives.Concat(new[] { programFiles, programFiles2, programFiles3, programFiles4, programFiles5, programFiles6, programFiles7 }) .SelectMany(GetPythonsInFolder).Distinct().ToArray(); } From 4ac341194cbd4ffe6bb931731d673b4d05187ab2 Mon Sep 17 00:00:00 2001 From: Rolf Madsen Date: Tue, 27 Jan 2026 09:40:26 +0100 Subject: [PATCH 2/2] Fix path concatenation for Python installations --- OpenTap.Python/PythonInstallationDiscoverer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenTap.Python/PythonInstallationDiscoverer.cs b/OpenTap.Python/PythonInstallationDiscoverer.cs index 8ebb885..2760ff5 100644 --- a/OpenTap.Python/PythonInstallationDiscoverer.cs +++ b/OpenTap.Python/PythonInstallationDiscoverer.cs @@ -103,7 +103,7 @@ static IEnumerable LocatePythonsWin32() "Programs", "Python"); var programFiles6 = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles); var programFiles7 = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), - "Python"); //C:\Users\fredandr\AppData\Local\Python\bin + "Python"); return drives.Concat(new[] { programFiles, programFiles2, programFiles3, programFiles4, programFiles5, programFiles6, programFiles7 }) .SelectMany(GetPythonsInFolder).Distinct().ToArray(); @@ -242,4 +242,4 @@ static IEnumerable TryFindPythons(string path) } } } -} \ No newline at end of file +}