欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

解决“No module named django.core”

程序员文章站 2022-07-14 15:52:02
...
反复的删除django和重装就会有这个问题

bogon:~ apple$ django-admin.py startproject aa
Traceback (most recent call last):
  File "/usr/local/bin/django-admin.py", line 2, in <module>
    from django.core import management
ImportError: No module named django.core
bogon:~ apple$ 


查看python setup.py install >a.log

只干了两件事,一个是copy django目录,一个是copy 这个文件django-admin.py
copying build/scripts-2.7/django-admin.py -> /usr/local/bin
changing mode of /usr/local/bin/django-admin.py to 755

需要检查
python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"

export $PYTHONPATH可能不一样

转载http://bbs.scmroad.com/viewthread.php?tid=1429&page=1&extra=page%3D1#pid2621
相关标签: apple