I am using Mac OS X Mavericks.
I have an error with installing Django. Using the "pip install" command I installed Django. It is in the directory below.
Requirement already satisfied (use --upgrade to upgrade): Django in /usr/local/lib/python2.7/site-packages Cleaning up...
When I type "python" into the command line, and then "import django", it says No Module Named Django.
Based on reading other answers, apparently sys.path will say which directories I can install Django in.
So I did:
import sys for x in sys.path: print x
This gives the following list of directories:
/Library/Python/2.7/site-packages/scikit_learn-0.14.1-py2.7-macosx-10.9-intel.egg /Library/Python/2.7/site-packages/setuptools-2.0.1-py2.7.egg /Library/Python/2.7/site-packages/py2app-0.7.3-py2.7.egg /Library/Python/2.7/site-packages/modulegraph-0.10.4-py2.7.egg /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC /Library/Python/2.7/site-packages
So clearly my pip install Django is not going in the right directory.
How can I use pip install to put Django in one of those directories?
There is a somewhat similar question here: During installation of Django, why do I keep getting ImportError: No module named django? . The answer recommends adding the directory to the path using sys.path.append('insert path here') but I'm not sure if this is a good way of solving the problem.