Reputation: 6991
Im completely new to django and Ive been trying to set up an environment from here [https://docs.djangoproject.com/en/1.1/intro/tutorial01/]. Python was already setup on my mac Python 2.7.2. I followed the instructions and setup django using
sudo port install py27-django
And also added /etc/paths.d/macports
with
/opt/local/bin
/opt/local/sbin
/opt/local/lib/python2.7/site-packages/django/bin
But I still get the ImportError: No module named django
message when I import django from the python shell.
I looked at this link
importerror: No module named django but it didnt really help much. Any help is appreciated
Upvotes: 0
Views: 447
Reputation: 409
Have a look at this article... they are using virtualenv to set up the project and this fixed a lot of problems like this for me. With virtualenv, the system libraries and the libraries you need for your python project are separated, so your not mangling them together.
http://www.jeffknupp.com/blog/2012/02/09/starting-a-django-project-the-right-way/
Upvotes: 1
Reputation: 825
If I may, it looks like the last path you added was pointing to a python2.4
directory, you might need to look for django
in a python2.7
directory instead.
Upvotes: 0