DEV Community

Sami Ullah Saleem
Sami Ullah Saleem

Posted on

3

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)

Heroku

This site is powered by Heroku

Heroku was created by developers, for developers. Get started today and find out why Heroku has been the platform of choice for brands like DEV for over a decade.

Sign Up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay