yihuang2026 commited on
Commit
e21d716
·
unverified ·
1 Parent(s): d5fbe48

feat: use sys.executable instead of python on PATH

Browse files
Files changed (1) hide show
  1. src/fastmcp/client/transports.py +2 -1
src/fastmcp/client/transports.py CHANGED
@@ -3,6 +3,7 @@ import contextlib
3
  import datetime
4
  import os
5
  import shutil
 
6
  from collections.abc import AsyncIterator
7
  from pathlib import Path
8
  from typing import (
@@ -185,7 +186,7 @@ class PythonStdioTransport(StdioTransport):
185
  args: list[str] | None = None,
186
  env: dict[str, str] | None = None,
187
  cwd: str | None = None,
188
- python_cmd: str = "python",
189
  ):
190
  """
191
  Initialize a Python transport.
 
3
  import datetime
4
  import os
5
  import shutil
6
+ import sys
7
  from collections.abc import AsyncIterator
8
  from pathlib import Path
9
  from typing import (
 
186
  args: list[str] | None = None,
187
  env: dict[str, str] | None = None,
188
  cwd: str | None = None,
189
+ python_cmd: str = sys.executable,
190
  ):
191
  """
192
  Initialize a Python transport.