No module named django.core error

EDIT # 2: Resolved! 7 hours due to default read permission. See the answer below!

Windows 8 machine, Django 1.6.5, Python 2.7.8

So, I installed Django earlier on a VPN (trying to learn how to code hard from China) and everything worked well. However, this time I tried, I got this error:

ImportError: No module named django.core

      

Here is its full image:

4WNbwdF.png

Here is what I have done so far by looking at other StackOverflow threads -

  • Checked that there is only one Python version (2.7.8)
  • Make sure I have activated virtualenv (you can see it in the image above)
  • Un / reinstall python anyway
  • Reinstalled django in this virtual
  • Configure another virtualenv to no avail
  • Recreated virtualenv from scratch
  • Double checking my PATH environment variable 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 am following this tutorial: http://codingforentrepreneurs.com/projects/launch-with-code/start-project/ )

  • Removed #!/usr/bin/env python

    from manage.py file; doesn't work, so put it back in

EDIT: - Disabled "Read Only" permissions for Lib \ site-packages \ django where the django-admin.py file is located

Must search stackoverflow instead of Bing / Google. Found a few other related questions / answers, but I'm confused: - $PYTHONPATH

my video guide doesn't mention this at all, so I have no idea where to start ( stack overflow). 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" %*

      

He gave me an error message:

Access is denied. Error occurred while processing: Python.File

      

I still have a problem, although you can see in the image.

+3


source to share


1 answer


Found the link here: http://samudranb.com/2012/06/02/how-to-setup-a-djangopython-development-env-on-windows/

Check the permissions for the "django" folder inside "YOUR_ENVIRONMENT \ Lib \ site-packages". Remove the read-only permission settings.



A read-only option was set in the specified folder, and after disabling it everything works again! It's time to get out of the sketchy KFC and get some sleep. Thanks everyone!

Also, shout out to @aruisdante who mentioned in the comments that it might be a permission error. Didn't know where to go to be inexperienced but glad it worked!

+1


source







All Articles