Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 1.36 KB

README.md

File metadata and controls

72 lines (53 loc) · 1.36 KB

Python Virtual Environment Setup Guide

Prerequisites

Steps

Windows

  1. Open Command Prompt

    • Press Win + R, type cmd, and press Enter.
  2. Navigate to your project directory

    cd path\to\your\project
  3. Create a virtual environment

    python -m venv venv
  4. Activate the virtual environment

    venv\Scripts\activate

    You should see (venv) at the beginning of the command line.

  5. Install packages from requirements.txt

    pip install -r requirements.txt
  6. Deactivate the virtual environment

    deactivate

macOS

  1. Open Terminal

    • Press Command + Space, type Terminal, and press Enter.
  2. Navigate to your project directory

    cd path/to/your/project
  3. Create a virtual environment

    python3 -m venv venv
  4. Activate the virtual environment

    source venv/bin/activate

    You should see (venv) at the beginning of the command line.

  5. Install packages from requirements.txt

    pip install -r requirements.txt
  6. Deactivate the virtual environment

    deactivate