π The fast, Pythonic way to build MCP servers and clients.
feat: use sys.executable instead of python on PATH
yihuangfb21ccb50ea6
diff --git a/src/fastmcp/client/transports.py b/src/fastmcp/client/transports.pyindex 68544512a..210286bf2 100644--- a/src/fastmcp/client/transports.py+++ b/src/fastmcp/client/transports.py@@ -3,6 +3,7 @@ import contextlibimport datetimeimport osimport shutil+import sysfrom collections.abc import AsyncIteratorfrom pathlib import Pathfrom typing import (@@ -185,7 +186,7 @@ class PythonStdioTransport(StdioTransport):args: list[str] | None = None,env: dict[str, str] | None = None,cwd: str | None = None,- python_cmd: str = "python",+ python_cmd: str = sys.executable,):"""Initialize a Python transport.