1
我有一個Django項目,已經部署。我爲項目使用了virtualenv,並在其中安裝了django。我已經激活了virtualenv。錯誤在virtualenv中運行createsuperuser
當我鍵入pip freeze
我得到:
Django==1.7.1
django-jalali==1.1
django-multiselectfield==0.1.3
jdatetime==1.3
但當我嘗試這個命令:python3 manage.py createsuperuser
我得到以下錯誤:
(.env)[email protected]:/srv/bmn-reg$ python3 manage.py createsuperuser
Traceback (most recent call last):
File "manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
ImportError: No module named 'django'
(.env)[email protected]:/srv/bmn-reg$
我怎樣才能解決這個問題?
你的默認python是什麼?是2.X嗎?如果是這樣,你想使用'python3',你需要用pip3來安裝你的需求。 – Kasramvd