Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying to Heroku with Anaconda

Tags:

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?

like image 500
user2364214 Avatar asked Jul 04 '14 02:07

user2364214


People also ask

How do I deploy files to Heroku?

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.

Can you use Python with Heroku?

Heroku runs your app in a dyno — a smart, secure container with your choice of Python version.

Can you push to Heroku without GitHub?

You can use https://github.com/ddollar/heroku-push and push directories without git.


1 Answers

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.

like image 52
t_io Avatar answered Oct 19 '22 15:10

t_io