fix python path not found issue (#2094)
This commit is contained in:
@@ -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**
|
||||
```bash
|
||||
pip install skyvern
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "skyvern"
|
||||
version = "0.1.72"
|
||||
version = "0.1.73"
|
||||
description = ""
|
||||
authors = ["Skyvern AI <info@skyvern.com>"]
|
||||
readme = "README.md"
|
||||
|
||||
@@ -569,13 +569,22 @@ def setup_mcp_config() -> str:
|
||||
"""
|
||||
return the path to the python environment
|
||||
"""
|
||||
python_path = shutil.which("python")
|
||||
# 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:
|
||||
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
|
||||
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:
|
||||
path_to_env = typer.prompt("Enter the full path to your configured python environment")
|
||||
# Show the first found Python as default
|
||||
_, default_path = python_paths[0]
|
||||
path_to_env = default_path
|
||||
return path_to_env
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user