ImportError: No module named 'decouple' while deploying on Heroku

前端 未结 4 434
悲&欢浪女
悲&欢浪女 2021-01-03 07:08

I was trying to deploy my django project on heroku from heroku cli. So I created an app and then I ran git push heroku master from the project directory. Then I

相关标签:
4条回答
  • 2021-01-03 07:35

    I also had this problem, but by adding

    python-decouple==3.1

    into the requirements.txt file, I was able to get past it!

    0 讨论(0)
  • 2021-01-03 07:47

    I think you haven't written packages name from requirements.txt to the Pipfile bellow [packages] section. You should add packages in this format-

    package_name = "version"
    
    0 讨论(0)
  • 2021-01-03 07:48

    I had the same problem, I'm new to django. The steps above didn't work after updating requirements.txt until I switched env.

    source env/Scripts/activate
    pip install -r requirements.txt
    py manage.py runserver
    
    0 讨论(0)
  • 2021-01-03 07:54

    I also had this problem and solved by removing all package (removed 2x python-decouple from locally and decouple) from my env and locally. Then, I installed python-decouple (3.3) again.

    0 讨论(0)
提交回复
热议问题