Python: prefer python3 from path as default interpreter

Change-Id: Ic53fc19f59da29d55c8f59385afc74a2524d6e49
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
David Schulz
2021-12-09 12:46:24 +01:00
parent d681933a6b
commit cfdf613679

View File

@@ -436,7 +436,9 @@ static void addPythonsFromPath(QList<Interpreter> &pythons)
static QString idForPythonFromPath(QList<Interpreter> pythons)
{
const FilePath &pythonFromPath = Environment::systemEnvironment().searchInPath("python");
FilePath pythonFromPath = Environment::systemEnvironment().searchInPath("python3");
if (pythonFromPath.isEmpty())
pythonFromPath = Environment::systemEnvironment().searchInPath("python");
if (pythonFromPath.isEmpty())
return {};
const Interpreter &defaultInterpreter