diff --git a/src/plugins/debugger/gdb/gdbengine.cpp b/src/plugins/debugger/gdb/gdbengine.cpp
index b3b6e91e05a4577f48f1e7f775760824fddca2f1..554c820eb49b2b215d961691c2e3d5123827d2f3 100644
--- a/src/plugins/debugger/gdb/gdbengine.cpp
+++ b/src/plugins/debugger/gdb/gdbengine.cpp
@@ -1829,7 +1829,7 @@ void GdbEngine::handleShowVersion(const GdbResponse &response)
             postCommand("set detach-on-fork off", ConsoleCommand);
 
         //postCommand("set build-id-verbose 2", ConsoleCommand);
-        postCommand("python print 43", ConsoleCommand, CB(handleHasPython));
+        postCommand("python print(sys.version)", ConsoleCommand, CB(handleHasPython));
     }
 }