I have a Django app I want to deploy to Heroku. I tried to follow the instructions here: https://devcenter.heroku.com/articles/getting-started-with-django which tells you to use virtual env.
However, I'm using Anaconda, which isn't playing nicely with virtual env. Has anyone deployed a Django app with Anaconda to Heroku and can lead me through the steps?
To deploy your app to Heroku, use the git push command to push the code from your local repository's main branch to your heroku remote. For example: $ git push heroku main Initializing repository, done.
Heroku runs your app in a dyno — a smart, secure container with your choice of Python version.
You can use https://github.com/ddollar/heroku-push and push directories without git.
I had this problem too.
I wanted to deploy a django app which use numpy, sckit-learn and some other conda packages.
I used the conda-buildpack but the installed packages weren't accessible from inside django. So I created a fork which extended the PYTHONPATH
and removed the part where dependencies installed withpip install -r requirements.txt
because this part clashed with memcached on heroku.
Now I have a multiple buildpack setup
with the default heroku python buildpack and my custom condas buildpack fork
The requirements.txt
is processed by the python buildpack and the conda-requirements.txt
by the conda buildpack. Works like a charm for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With