heroku errors ImportError: No module named crispy_

2019-06-11 11:19发布

I have a question When I ran this command heroku run python manage.py migrate

I got this error: ImportError: No module named crispy_forms

But on locally every things are doing well but my app is don't to run on Heroku please help me ?

3条回答
贼婆χ
2楼-- · 2019-06-11 11:51

you can also do

heroku run pip freeze

that will give you a list of installed pip apps on heroku.. but ya also check your requirements.txt file

查看更多
相关推荐>>
3楼-- · 2019-06-11 11:53

I had the same issue when running heroku run python manage.py migrate command. Here is what I did and solve the issue:

  • Verify the crispy_forms in the INSTALLED_APPS under settings.py
  • Run pip install --upgrade django-crispy-forms or pip3 install --upgrade django-crispy-forms depends on the Python version you are using (pip3 is for Python version 3 and above)

If the aboves didn't work, try Daniel Roseman's suggestion:

This helped me and hope this will work for you as well. But don't forget to run (i) git add ., (ii) git commit -m "your comment", and (iii) git push heroku master before running heroku run python manage.py migrate command again.

查看更多
Animai°情兽
4楼-- · 2019-06-11 12:09

if you haven't already, run this on your heroku platform:

pip install django-crispy-forms

remember that your local dependencies will not be installed automatically on your heroku dynos.

查看更多
登录 后发表回答