Skip to content

Commit 040eb6d

Browse files
authored
feat: lower minimum Python requirement to 3.10+ (#362)
* feat: lower minimum Python requirement to 3.10+ - Updated Python version requirement from 3.11+ to 3.10+ across all platform detectors - Added Python 3.10 to MacOS framework search paths for broader compatibility - Modified version validation logic to accept Python 3.10 or higher - Updated documentation and error messages to reflect new minimum Python version - Changed pyproject.toml requires-python field to ">=3.10" - Updated badges and requirements in README files to show Python 3.10 support * feat: add Python 3.10 and 3.11 to Windows path detection - Added Python 3.10 installation path to LocalApplicationData search locations - Added Python 3.10 and 3.11 paths to ProgramFiles search locations - Expanded Python version compatibility to support older installations while maintaining support for newer versions * feat: add Python 3.14 support and update path detection - Added Python 3.14 installation paths to Windows and macOS platform detectors - Removed legacy Python 3.9 paths from Windows path detection - Updated Windows installation recommendations to suggest Python 3.10 or higher - Added additional Python framework paths (3.10, 3.11) for macOS UV package manager detection - Extended UV executable path detection to include Python 3.14 locations on both platforms * Reduce size of README img * Revert "Reduce size of README img" This reverts commit 6fb99c7. * Adjust size in README to maintain quality but be smaller
1 parent 8f227ff commit 040eb6d

File tree

14 files changed

+301
-31
lines changed

14 files changed

+301
-31
lines changed

MCPForUnity/Editor/Dependencies/DependencyManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ private static void GenerateRecommendations(DependencyCheckResult result, IPlatf
126126
{
127127
if (dep.Name == "Python")
128128
{
129-
result.RecommendedActions.Add($"Install Python 3.11+ from: {detector.GetPythonInstallUrl()}");
129+
result.RecommendedActions.Add($"Install Python 3.10+ from: {detector.GetPythonInstallUrl()}");
130130
}
131131
else if (dep.Name == "UV Package Manager")
132132
{

MCPForUnity/Editor/Dependencies/PlatformDetectors/LinuxPlatformDetector.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public override DependencyStatus DetectPython()
6262
}
6363
}
6464

65-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
65+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
6666
status.Details = "Checked common installation paths including system, snap, and user-local locations.";
6767
}
6868
catch (Exception ex)
@@ -144,10 +144,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
144144
version = output.Substring(7); // Remove "Python " prefix
145145
fullPath = pythonPath;
146146

147-
// Validate minimum version (Python 4+ or Python 3.11+)
147+
// Validate minimum version (Python 4+ or Python 3.10+)
148148
if (TryParseVersion(version, out var major, out var minor))
149149
{
150-
return major > 3 || (major >= 3 && minor >= 11);
150+
return major > 3 || (major >= 3 && minor >= 10);
151151
}
152152
}
153153
}

MCPForUnity/Editor/Dependencies/PlatformDetectors/MacOSPlatformDetector.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,11 @@ public override DependencyStatus DetectPython()
3333
"/usr/bin/python3",
3434
"/usr/local/bin/python3",
3535
"/opt/homebrew/bin/python3",
36+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
3637
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
3738
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
38-
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
39+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
40+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
3941
};
4042

4143
foreach (var candidate in candidates)
@@ -64,7 +66,7 @@ public override DependencyStatus DetectPython()
6466
}
6567
}
6668

67-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
69+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
6870
status.Details = "Checked common installation paths including Homebrew, Framework, and system locations.";
6971
}
7072
catch (Exception ex)
@@ -143,10 +145,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
143145
version = output.Substring(7); // Remove "Python " prefix
144146
fullPath = pythonPath;
145147

146-
// Validate minimum version (Python 4+ or Python 3.11+)
148+
// Validate minimum version (Python 4+ or Python 3.10+)
147149
if (TryParseVersion(version, out var major, out var minor))
148150
{
149-
return major > 3 || (major >= 3 && minor >= 11);
151+
return major > 3 || (major >= 3 && minor >= 10);
150152
}
151153
}
152154
}

MCPForUnity/Editor/Dependencies/PlatformDetectors/WindowsPlatformDetector.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,26 @@ public override DependencyStatus DetectPython()
3030
{
3131
"python.exe",
3232
"python3.exe",
33+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
34+
"Programs", "Python", "Python314", "python.exe"),
3335
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3436
"Programs", "Python", "Python313", "python.exe"),
3537
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3638
"Programs", "Python", "Python312", "python.exe"),
3739
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
3840
"Programs", "Python", "Python311", "python.exe"),
41+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
42+
"Programs", "Python", "Python310", "python.exe"),
43+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
44+
"Python314", "python.exe"),
3945
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
4046
"Python313", "python.exe"),
4147
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
42-
"Python312", "python.exe")
48+
"Python312", "python.exe"),
49+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
50+
"Python311", "python.exe"),
51+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles),
52+
"Python310", "python.exe")
4353
};
4454

4555
foreach (var candidate in candidates)
@@ -68,7 +78,7 @@ public override DependencyStatus DetectPython()
6878
}
6979
}
7080

71-
status.ErrorMessage = "Python not found. Please install Python 3.11 or later.";
81+
status.ErrorMessage = "Python not found. Please install Python 3.10 or later.";
7282
status.Details = "Checked common installation paths and PATH environment variable.";
7383
}
7484
catch (Exception ex)
@@ -94,7 +104,7 @@ public override string GetInstallationRecommendations()
94104
return @"Windows Installation Recommendations:
95105
96106
1. Python: Install from Microsoft Store or python.org
97-
- Microsoft Store: Search for 'Python 3.12' or 'Python 3.13'
107+
- Microsoft Store: Search for 'Python 3.10' or higher
98108
- Direct download: https://python.org/downloads/windows/
99109
100110
2. UV Package Manager: Install via PowerShell
@@ -132,10 +142,10 @@ private bool TryValidatePython(string pythonPath, out string version, out string
132142
version = output.Substring(7); // Remove "Python " prefix
133143
fullPath = pythonPath;
134144

135-
// Validate minimum version (Python 4+ or Python 3.11+)
145+
// Validate minimum version (Python 4+ or Python 3.10+)
136146
if (TryParseVersion(version, out var major, out var minor))
137147
{
138-
return major > 3 || (major >= 3 && minor >= 11);
148+
return major > 3 || (major >= 3 && minor >= 10);
139149
}
140150
}
141151
}

MCPForUnity/Editor/Helpers/ServerInstaller.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,12 @@ internal static string FindUvPath()
733733
Path.Combine(programFiles, "WinGet", "Links", "uv.exe"),
734734

735735
// Common per-user installs
736+
Path.Combine(localAppData, @"Programs\Python\Python314\Scripts\uv.exe"),
736737
Path.Combine(localAppData, @"Programs\Python\Python313\Scripts\uv.exe"),
737738
Path.Combine(localAppData, @"Programs\Python\Python312\Scripts\uv.exe"),
738739
Path.Combine(localAppData, @"Programs\Python\Python311\Scripts\uv.exe"),
739740
Path.Combine(localAppData, @"Programs\Python\Python310\Scripts\uv.exe"),
741+
Path.Combine(appData, @"Python\Python314\Scripts\uv.exe"),
740742
Path.Combine(appData, @"Python\Python313\Scripts\uv.exe"),
741743
Path.Combine(appData, @"Python\Python312\Scripts\uv.exe"),
742744
Path.Combine(appData, @"Python\Python311\Scripts\uv.exe"),
@@ -761,8 +763,11 @@ internal static string FindUvPath()
761763
Path.Combine(home, ".local", "bin", "uv"),
762764
"/opt/homebrew/opt/uv/bin/uv",
763765
// Framework Python installs
766+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/uv",
764767
"/Library/Frameworks/Python.framework/Versions/3.13/bin/uv",
765768
"/Library/Frameworks/Python.framework/Versions/3.12/bin/uv",
769+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/uv",
770+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/uv",
766771
// Fallback to PATH resolution by name
767772
"uv"
768773
};

MCPForUnity/Editor/Services/PathResolverService.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@ public bool IsPythonDetected()
7676
// Common Windows Python installation paths
7777
string[] windowsCandidates =
7878
{
79+
@"C:\Python314\python.exe",
7980
@"C:\Python313\python.exe",
8081
@"C:\Python312\python.exe",
8182
@"C:\Python311\python.exe",
8283
@"C:\Python310\python.exe",
83-
@"C:\Python39\python.exe",
84+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python314\python.exe"),
8485
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python313\python.exe"),
8586
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python312\python.exe"),
8687
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python311\python.exe"),
8788
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python310\python.exe"),
88-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Programs\Python\Python39\python.exe"),
89+
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python314\python.exe"),
8990
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python313\python.exe"),
9091
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python312\python.exe"),
9192
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python311\python.exe"),
9293
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python310\python.exe"),
93-
Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), @"Python39\python.exe"),
9494
};
9595

9696
foreach (string c in windowsCandidates)
@@ -134,8 +134,11 @@ public bool IsPythonDetected()
134134
"/usr/bin/python3",
135135
"/opt/local/bin/python3",
136136
Path.Combine(home, ".local", "bin", "python3"),
137+
"/Library/Frameworks/Python.framework/Versions/3.14/bin/python3",
137138
"/Library/Frameworks/Python.framework/Versions/3.13/bin/python3",
138139
"/Library/Frameworks/Python.framework/Versions/3.12/bin/python3",
140+
"/Library/Frameworks/Python.framework/Versions/3.11/bin/python3",
141+
"/Library/Frameworks/Python.framework/Versions/3.10/bin/python3",
139142
};
140143
foreach (string c in candidates)
141144
{

MCPForUnity/Editor/Setup/SetupWizardWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ private void DrawSetupStep()
120120
{
121121
// Only show critical warnings when dependencies are actually missing
122122
EditorGUILayout.HelpBox(
123-
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.11+ and UV package manager to function properly.",
123+
"\u26A0 Missing Dependencies: MCP for Unity requires Python 3.10+ and UV package manager to function properly.",
124124
MessageType.Warning
125125
);
126126

MCPForUnity/UnityMcpServer~/src/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "MCPForUnityServer"
33
version = "6.3.0"
44
description = "MCP for Unity Server: A Unity package for Unity Editor integration via the Model Context Protocol (MCP)."
55
readme = "README.md"
6-
requires-python = ">=3.11"
6+
requires-python = ">=3.10"
77
dependencies = [
88
"httpx>=0.27.2",
99
"fastmcp>=2.12.5",

0 commit comments

Comments
 (0)