I run at a cloned Django repository
python manage.py runserver
I get
Traceback (most recent call last):
File "manage.py", line 2, in <module>
from django.core.management import execute_manager
ImportError: No module named django.core.management
The problem is in my PYTHONPATH according to MacPorts' IRC.
I run
ls -l $(which python)
I get
lrwxr-xr-x 1 root wheel 68B Jan 29 12:27 /usr/local/bin/python -> ../../../Library/Frameworks/Python.framework/Versions/2.6/bin/python
This command suggests according to krunk that my PATHs are incorrect: /opt/local/... should be before /usr/local/...
However, I am not sure what he means.
My PYTHONPATH in ~/.zshrc is
export PYTHONPATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/:$HOME/.python_libraries:
where /opt/local/... is the first PATH as krunk suggests.
I run
which $PYTHONPATH
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/:/Users/Sam/.python_libraries: not found
My PYTHONPATH has something wrong: apparently the /opt/locall/... is not right.
How can you get the PYTHONPATH correct?
.zshrc
file? If you need to point the PYTHONPATH somewhere specific for Django, you'll probably have to do that manually according to the installation instructions.