2

I need to install rdkit in heroku for my heroku app to run. I installed rdkit locally in my laptop by using

sudo apt-get install python-rdkit.

But when I generated the requirements file using pip freeze , the generated file is not showing the rdkit. And pip install python-rdkit or pip install rdkit are not working. Can any one please tell me how can I install rdkit on heroku?

Bipin Bhandari
  • 2,694
  • 23
  • 38
anonymous
  • 21
  • 2

2 Answers2

0

Install anaconda and

conda install -c rdkit rdkit

as per instructions here: http://www.rdkit.org/docs/Install.html

JoshuaBox
  • 735
  • 1
  • 4
  • 16
0

Though the question was asked about seven years ago, I recently faced the same problem doing this. So I am writing the process I followed and succeeded, if it helps anyone.

First add a conda buildpack on your heroku project, because rdkit is not available on pip. I have used this buildpack for my rdkit project before. The official conda buildpack is deprecated and it does not support python3. If you use heroku cli then just insert this command to use this buildpack:

heroku buildpacks:set https://github.com/pl31/heroku-buildpack-conda

This buildpack needs an environment.yml file for conda packages instead of requirements.txt file which we use for pip. To create the file from your virtual environment use this command: conda env export > environment.yml. This command also lists all the pip packages so you won't need separate file for pip packages. If you want to create a virtualenv from this file just run conda env create -f environment.yml.

Once this file is there, you can deploy your project as you would do for any other python projects.

let me down slowly
  • 822
  • 10
  • 27