DEV Community

Sami Ullah Saleem
Sami Ullah Saleem

Posted on

How to install and activate Virtual Environment in Python Django

1. cd C:\Users\user\Desktop\UserDjangoProject> **pip install virtualenv**
2. For Create a venv run this ** virtualenv -p python3 venv**
3. Activate **virtualenv venv\Scripts\activate**
4. It will look like this (venv) C:\Users\user\Desktop\UserDjangoProject>
5. Then run **pip install -r requirements.txt**
6. Run the django project run this **./manage.py runserver**

If error occurs like
`bash: env/venv/bin/activate: Permission denied`
Run . env/venv/bin/activate (Your path can be change)
Enter fullscreen mode Exit fullscreen mode

Top comments (0)