django import error with python3.3 in virtual environment?

This is the place for queries that don't fit in any of the other categories.

django import error with python3.3 in virtual environment?

Postby markings » Mon Jul 29, 2013 12:15 pm

I've been trying to fix this for more than 10 hours now. :x

I replaced my python3.3 installation with python2.7 but when I tried to create a django project in a virtual environment I encountered this error:

Code: Select all
    from django.core import management
ImportError: No module named django.core


I went to python shell in that virtual environment to check if django is correctly installed with:
Code: Select all
from django.core import management
.no errors are thrown.

I googled and people say its about pythonpath and path in system variable being not in sync, but they did not specify how to fix it.

I already added D:\Python27\ and D:\Python27\Scripts\ in my PATH in system variables but I don't know about python path.

With python3.3, everything went smoothly. But I need to use python2.7.

Thanks.
Last edited by Yoriz on Mon Jul 29, 2013 12:30 pm, edited 1 time in total.
Reason: changed the title
markings
 
Posts: 1
Joined: Mon Jul 29, 2013 11:50 am

Re: django import error with python3.3 in virtual environmen

Postby setrofim » Thu Aug 01, 2013 4:00 pm

Judging from your Paths, you're on windows.
  1. You probably need to re-create the virtual env
  2. Make sure that python2.7 is not only in your PATH, but that it is also ther before python3.3 (if that is still in there).
  3. If the above does not work, check your file extension associations and make sure that .py is associated with python2.7.
setrofim
 
Posts: 288
Joined: Mon Mar 04, 2013 7:52 pm


Return to General Coding Help

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 4 guests