Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
fix python path not found issue (#2094)
Shuchang Zheng5158a1045376
diff --git a/integrations/mcp/README.md b/integrations/mcp/README.mdindex 201a20bba..7faddaac7 100644--- a/integrations/mcp/README.md+++ b/integrations/mcp/README.md@@ -19,6 +19,8 @@ You can connect your MCP-enabled applications to Skyvern in two ways:- Get the API key from the settings page which will be used for setup## Quickstart+> ⚠️ **REQUIREMENT**: Skyvern only runs in Python 3.11 environment today ⚠️+1. **Install Skyvern**```bashpip install skyverndiff --git a/pyproject.toml b/pyproject.tomlindex abf13c759..32269113b 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -1,6 +1,6 @@[tool.poetry]name = "skyvern"-version = "0.1.72"+version = "0.1.73"description = ""authors = ["Skyvern AI <[email protected]>"]readme = "README.md"diff --git a/skyvern/cli/commands.py b/skyvern/cli/commands.pyindex d021e76c6..09d41b6ae 100644--- a/skyvern/cli/commands.py+++ b/skyvern/cli/commands.py@@ -569,13 +569,22 @@ def setup_mcp_config() -> str:"""return the path to the python environment"""- python_path = shutil.which("python")- if python_path:- use_default = typer.prompt(f"Found Python at {python_path}. Use this path? (y/n)").lower() == "y"- if use_default:- path_to_env = python_path- else:- path_to_env = typer.prompt("Enter the full path to your configured python environment")+ # Try to find Python in this order: python, python3, python3.12, python3.11, python3.10, python3.9+ python_paths = []+ for python_cmd in ["python", "python3.11"]:+ python_path = shutil.which(python_cmd)+ if python_path:+ python_paths.append((python_cmd, python_path))++ if not python_paths:+ print("Error: Could not find any Python installation. Please install Python 3.11 first.")+ path_to_env = typer.prompt(+ "Enter the full path to your python 3.11 environment. For example in MacOS if you installed it using Homebrew, it would be /opt/homebrew/bin/python3.11"+ )+ else:+ # Show the first found Python as default+ _, default_path = python_paths[0]+ path_to_env = default_pathreturn path_to_env