SETTING UP ENVIRONMENT
1. Install Python
-
Check if Python is installed:
python --versionor
python3 --version
-
Install Python (if not already installed):
- Download Python from the official website.
- Follow the installation steps for your operating system.
- Ensure you check the box Add Python to PATH during installation.
-
Verify Installation:
2. Create a Virtual Environment
-
Create the virtual environment:
python -m venv .venv
This will create a folder named
.venvin your current directory to isolate your project environment. -
Activate the virtual environment:
- For Windows:
.venv\Scripts\activate- For macOS/Linux:
source .venv/bin/activate
Once activated, you will see the virtual environment name (e.g.,
(.venv)) in your terminal prompt.
3. Install Django
-
Install Django inside the virtual environment:
pip install django -
Verify Django Installation:
django-admin --version
This command should return the version of Django installed.
20

