importerror: No module named django

后端 未结 4 731
梦毁少年i
梦毁少年i 2021-01-18 09:41

I installed python 2.6 alongside my mac\'s 2.5.2 version. As soon as I did, python2.6 manage.py runserver failed because it couldn\'t find django.core.management.

Fr

4条回答
  •  伪装坚强ぢ
    2021-01-18 10:08

    Add site-packages to PYTHONPATH:

    export PYTHONPATH="/home/jerome/bin/django-1.1/lib/python2.6/site-packages:$PYTHONPATH"
    

    Worked on Ubuntu, with a python/django virtual environment using virtualenv and pip.

    Source: http://benfsayer.com/importerror-no-module-named-django-core-management/

提交回复
热议问题