@@ -62,45 +62,44 @@ await stagehand.agent.execute("book a reservation for 2 people for a trip to the
6262
6363## Installation
6464
65- ** Recommended:** Install using ` uv ` (fast Python package manager):
65+ ### Creating a Virtual Environment (Recommended)
66+
67+ First, create and activate a virtual environment to keep your project dependencies isolated:
6668
6769``` bash
68- uv add stagehand
70+ # Create a virtual environment
71+ python -m venv stagehand-env
72+
73+ # Activate the environment
74+ # On macOS/Linux:
75+ source stagehand-env/bin/activate
76+ # On Windows:
77+ stagehand-env\S cripts\a ctivate
6978```
7079
71- Alternatively, install via pip:
80+ ### Install Stagehand
7281
82+ ** Normal Installation:**
7383``` bash
7484pip install stagehand
7585```
7686
77- ### Installing with uv
78-
79- [ uv] ( https://github.com/astral-sh/uv ) is a fast Python package installer and resolver. If you don't have uv installed, you can install it with:
87+ ** Local Development Installation:**
88+ If you're contributing to Stagehand or want to modify the source code:
8089
8190``` bash
82- # On macOS and Linux
83- curl -LsSf https://astral.sh/uv/install.sh | sh
91+ # Clone the repository
92+ git clone https://github.com/browserbase/stagehand-python.git
93+ cd stagehand-python
8494
85- # On Windows
86- powershell -c " irm https://astral.sh/uv/install.ps1 | iex"
87-
88- # Or via pip
89- pip install uv
90- ```
91-
92- For new projects, you can create a new project with uv:
93-
94- ``` bash
95- uv init stagehand-project
96- cd stagehand-project
97- uv add stagehand
95+ # Install in editable mode with development dependencies
96+ pip install -e .[dev]
9897```
9998
10099## Requirements
101100
102101- Python 3.9+
103- - All dependencies are automatically handled when installing via ` uv ` or ` pip `
102+ - All dependencies are automatically handled when installing via ` pip `
104103
105104The main dependencies include:
106105- httpx (for async HTTP client)
@@ -112,17 +111,11 @@ The main dependencies include:
112111
113112### Development Dependencies
114113
115- For development, install with dev dependencies:
116-
117- ``` bash
118- uv add stagehand --dev
119- ```
120-
121- Or install dev dependencies separately:
122-
123- ``` bash
124- uv add --dev pytest pytest-asyncio pytest-mock pytest-cov black isort mypy ruff rich
125- ```
114+ The development dependencies are automatically installed when using ` pip install -e .[dev] ` and include:
115+ - pytest, pytest-asyncio, pytest-mock, pytest-cov (testing)
116+ - black, isort, ruff (code formatting and linting)
117+ - mypy (type checking)
118+ - rich (enhanced terminal output)
126119
127120## Environment Variables
128121
0 commit comments