I am attempting to configure a virtual environment on a Windows machine with virtualenv and I have been unable to to run manage.py
I reviewed a few other stackoverflow answers (Running django in virtualenv - ImportError: No module named django.core.management?) and was unable to resolve the issue that I am having.
Here is where I am at...
C:\Users\tyarboro\Documents\Project (master)
(venv) λ pip freeze
Django==1.7
django-admin-sso==2.1.0
django-social-auth==0.7.28
httplib2==0.9.2
json2html==1.0.1
oauth2==1.9.0.post1
oauth2client==2.2.0
pyasn1==0.1.9
pyasn1-modules==0.0.8
python-openid==2.2.5
rsa==3.4.2
six==1.10.0
C:\Users\tyarboro\Documents\Project (master)
(venv) λ manage.py
Traceback (most recent call last):
File "C:\Users\tyarboro\Documents\Project\manage.py", line 9, in <module>
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
I have attempted the following modifications to the manage.py
- Removed the first line of the file #!/usr/bin/env python
- Set the sys.path.append to the directory that contains the site-packages in my virtual environment. sys.path.append('C:\Users\tyarboro\Documents\Project\venv\bin\activate\Lib\site-packages')
I think the issue is that the virtual environment is running Python outside of the virtual environment instead of within the virtual environment. Any suggestions on how to fix this?
Thanks!