My virtual environment refuses to recognize my install of Django (strangely)
I'm on Windows Server, installed Python 3.7 to a directory (C:\Python37
) which I have C:\Python37;C:\Python37\Scripts
in my windows Path so when using Powershell or GitBash I can use the python
command.
if I run where python
it shows the default install
I CD into my django project directory and run:
python virtualenv venv
and the venv directory is created
Then I run source venv/Scripts/activate
and it activates appropriately.
When I run where python
it shows the exe inside the venv
directory - which is expected and appropriate.
I run pip install -r requirements.txt
and all my requirements install appropriately. I confirm they are installed with pip freeze
(all installed correctly)
Once I do that I go to run python manage.py collectstatic
(no migrations are required in this particular instance) I get an error message that Django isn't installed.
To check this, with my virtualenv still activated I enter the shell (python
)
If I do import django
it also says Django is not installed.
I cannot figure out what's happening here - the python version appears to be correct, the correct virtualenv is activated - but it's still not seeing the properly installed Django installation.
Thoughts? Ideas?