diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 343bc6f0..042243b9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,36 @@ Thank you for your interest in contributing to the Python Environments extension cd vscode-python-environments ``` -2. **Create a Python virtual environment** +2. **Create a Python virtual environment** + + 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. + + **Using the Python Environments extension (recommended):** + + 1. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) + 2. Run **Python: Create Environment** + 3. Select **Venv** as the environment type + 4. Choose your preferred Python interpreter + 5. The extension will create the `.venv` folder and configure your workspace automatically + + **Alternatively, from the command line:** + + ```bash + # Create the virtual environment + python -m venv .venv + + # Activate it (Linux/macOS) + source .venv/bin/activate + + # Activate it (Windows - Command Prompt) + .venv\Scripts\activate.bat + + # Activate it (Windows - PowerShell) + .venv\Scripts\Activate.ps1 + ``` + + > **Note:** Keep the virtual environment activated while developing. The extension uses this environment for running Python-related tests and for environment discovery during development. + 3. **Install dependencies** ```bash