Search code examples
djangoseleniumherokuimporterror

ImportError when using heroku for my django web


I checked django is installed properly and in my 'requirements.txt' I wrote 'Django==3.2.3'. However, I cannot use this code:

heroku run python manage.py migrate

So I checked this code:

python manage.py migrate

and found out it worked properly. I know that there are existing questions and read many of them, but I think I have tried everything I could do. I would be really grateful if someone can solve this problem.


Solution

  • your question isn't clear tbh.

    install all the dependencies by using the pip freeze command and try to run your heroku commands in the heroku bash available in your heroku dashboard

    to run the commands on your heroku machine from your CMD, then command is

    heroku run bash --app your_app_name

    then you can run whatever command you want.

    but I am not sure what is the exact problem you are having.