EDIT #2: Solved! 7 hours spent because of a default read-only permission. See answer below!
Windows 8 machine, Django 1.6.5, Python 2.7.8
So I set Django up earlier on a VPN (trying to learn to code from China is tough) and everything worked well. However, this time I tried it, I got this error:
ImportError: No module named django.core
Here's a picture of it in full:
Here's what I've done so far after looking at other StackOverflow threads -
- Checked to make sure there is only one version of Python (2.7.8)
- Made sure I activated the virtualenv (you can see it in the image above)
- Un/reinstalled python anyways
- Reinstalled django in this virtualen
- Set up a different virtualenv to no avail
- Recreated virtualenv from scratch
- Double checked my environmental variable PATH was set to:
C:\Windows\System32;C:\Python27;C:\Python27\python.exe;C:\Python27\Scripts\;C:\Python27\Lib\site-packages\django\bin;
(this is because I'm following this tutorial: http://codingforentrepreneurs.com/projects/launch-with-code/start-project/)
- Removed
#!/usr/bin/env python
from both manage.py; didn't work, so put it back in
EDIT: - Turned off "Read-only" permissions of Lib\site-packages\django where the django-admin.py file is located
Should have searched on stackoverflow instead of Bing/Google. Found a few other related questions/answers but am confused about:
- $PYTHONPATH
, my video guide doesn't mention this at all so I have no idea where to start (https://stackoverflow.com/a/6059969/4194756 and http://blog.jayteebee.org/2009/07/importerror-no-module-named-djangocore.html)
- When I tried this way to use the "correct" python,
ftype Python.File="E:\Python27\YOUR_ENVIRONMENT\Scripts\python.exe" "%1" %*
It gave me an error message:
Access is denied. Error occurred while processing: Python.File
I've still got a problem though as you can see in the image.