Skip to content

Commit 63bc2c2

Browse files
Copilotedvilmeeleanorjboyd
authored
Add Python virtual environment setup instructions to CONTRIBUTING.md (#1499)
Step 2 in the Getting Started section said "Create a Python virtual environment" with no instructions or rationale. Added: - Why a venv matters (dependency isolation, reproducible builds) - Instructions for using the Python Environments extension's "Create Environment" command (recommended approach) - Alternative manual command-line instructions (`python -m venv .venv`) with activation commands for Linux/macOS, Windows CMD, and PowerShell - Note about keeping it activated during development --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: edvilme <5952839+edvilme@users.noreply.github.com> Co-authored-by: eleanorjboyd <26030610+eleanorjboyd@users.noreply.github.com>
1 parent 9fbeb75 commit 63bc2c2

1 file changed

Lines changed: 30 additions & 1 deletion

File tree

CONTRIBUTING.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,36 @@ Thank you for your interest in contributing to the Python Environments extension
1717
cd vscode-python-environments
1818
```
1919

20-
2. **Create a Python virtual environment**
20+
2. **Create a Python virtual environment**
21+
22+
A Python virtual environment is important for development because it isolates the Python dependencies used for testing and development from your system Python installation. This ensures reproducible builds and prevents conflicts with other projects.
23+
24+
**Using the Python Environments extension (recommended):**
25+
26+
1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`)
27+
2. Run **Python: Create Environment**
28+
3. Select **Venv** as the environment type
29+
4. Choose your preferred Python interpreter
30+
5. The extension will create the `.venv` folder and configure your workspace automatically
31+
32+
**Alternatively, from the command line:**
33+
34+
```bash
35+
# Create the virtual environment
36+
python -m venv .venv
37+
38+
# Activate it (Linux/macOS)
39+
source .venv/bin/activate
40+
41+
# Activate it (Windows - Command Prompt)
42+
.venv\Scripts\activate.bat
43+
44+
# Activate it (Windows - PowerShell)
45+
.venv\Scripts\Activate.ps1
46+
```
47+
48+
> **Note:** Keep the virtual environment activated while developing. The extension uses this environment for running Python-related tests and for environment discovery during development.
49+
2150

2251
3. **Install dependencies**
2352
```bash

0 commit comments

Comments
 (0)