Setting up Django in my virtual environment

Hello everyone,

After I finished the basic Python courses I wanted to get into web dev and decided to learn some django.

Before I read that it is advised to install django in a virtual environment, I installed django “the normal way”. So I uninstalled django, installed virtualenv, set up a virtual environment, activated it and installed django. I thought that would fix my problem. However, whenever I run pip list -v, it tells me that django is installed at the following location:

Django 3.1.3 c:\users\felix\appdata\local\programs\python\python38-32\lib\site-packages pip

No matter if I run this command in my venv or outside of it. This tells me that django is still installed globally.

Does anyone know how to solve this? I want to set up django correctly inside my virtual environment and understand this before I start to proceed with my learning.

Activate your environment, and see what pip freeze gives you. If Django is in there, then it’s installed in your environment.

-Jorge

Hi Jorge,

That did not work. But I solved it by changing my virtual environment path. One folder had spaces so I changed that and now it works fine. Thank you, though!

-Felix