How to install and activate Virtual Environment in Python Django

samiullahsaleem

Sami Ullah Saleem

Posted on December 3, 2022

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
💖 💪 🙅 🚩
samiullahsaleem
Sami Ullah Saleem

Posted on December 3, 2022

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related