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
|
- Get the API key from the settings page which will be used for setup
|
||||||
|
|
||||||
## Quickstart
|
## Quickstart
|
||||||
|
> ⚠️ **REQUIREMENT**: Skyvern only runs in Python 3.11 environment today ⚠️
|
||||||
|
|
||||||
1. **Install Skyvern**
|
1. **Install Skyvern**
|
||||||
```bash
|
```bash
|
||||||
pip install skyvern
|
pip install skyvern
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "skyvern"
|
name = "skyvern"
|
||||||
version = "0.1.72"
|
version = "0.1.73"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["Skyvern AI <info@skyvern.com>"]
|
authors = ["Skyvern AI <info@skyvern.com>"]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|||||||
@@ -569,13 +569,22 @@ def setup_mcp_config() -> str:
|
|||||||
"""
|
"""
|
||||||
return the path to the python environment
|
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
|
||||||
if python_path:
|
python_paths = []
|
||||||
use_default = typer.prompt(f"Found Python at {python_path}. Use this path? (y/n)").lower() == "y"
|
for python_cmd in ["python", "python3.11"]:
|
||||||
if use_default:
|
python_path = shutil.which(python_cmd)
|
||||||
path_to_env = python_path
|
if python_path:
|
||||||
else:
|
python_paths.append((python_cmd, python_path))
|
||||||
path_to_env = typer.prompt("Enter the full path to your configured python environment")
|
|
||||||
|
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_path
|
||||||
return path_to_env
|
return path_to_env
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user