DEV Community

Comficker
Comficker

Posted on

Install Django

It’s usually best to install Django to a virtual environment, where your project can be isolated from your other Python projects. Most commands assume you’re working in an active virtual environment.

Create a virtual environment

$ python –m venv v
Enter fullscreen mode Exit fullscreen mode

Activate the environment (Linux and OS X)

$ source v/bin/activate
Enter fullscreen mode Exit fullscreen mode

Activate the environment (Windows)

venv\Scripts\activate
Enter fullscreen mode Exit fullscreen mode

Install Django to the active environment

(venv)$ pip install Django
Enter fullscreen mode Exit fullscreen mode

Django Cheat Sheet

Top comments (0)