Reputation: 13178
I installed django using pip install django==1.5.4
and I see it in the following directory:
/usr/local/lib/python2.7/site-packages/django
however, when I type in python
and then say import django
, I see the following output:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named django
Is there anything else I can/need to do? I tried to uninstall and reinstall several times! I can confirm that 2.7.5 is the version of python used on my system...
EDIT
I realized now that if I type in python
it defaults to Python 2.7.5. But if I type in python2
it defaults to 2.7.6.
They are installed in these locations:
/System/Library/Frameworks/Python.framework/Versions/2.7 -- 2.7.5
/usr/local/Cellar/python/2.7.6/Frameworks/Python.framework/Versions/2.7 -- 2.7.6
Is there anyway to make the 2.7.6 version the default when I type in python
? Seems like django is installed there....
Upvotes: 0
Views: 379
Reputation: 5876
I figure that you have a link /usr/bin/python
that points to your 2.7.5 version, so remove it and create other with the same name (python
) to the version you want to use as default.
Nevertheless I recommends you to use virtualenvwrapper.
Upvotes: 1