Kaggle / docker-python

Kaggle Python docker image
Apache License 2.0
2.41k stars 940 forks source link

Add rdkit package #531

Closed vladkisin closed 5 years ago

vladkisin commented 5 years ago

It must be useful for many competitions for processing chemoinformatics data, but I've struggeled to install it to a kernel. https://www.rdkit.org

Would also be pleased to have an insight on how can it be installed to kaggle kernel manually.

erdalsivri commented 5 years ago

This was a bit tricky as following the instructions on https://www.rdkit.org/docs/Install.html didn't work on a Kaggle kernel. However, I was able to install it using a single command on an Internet enabled kernel:

!conda install -y -c rdkit rdkit

This takes around one minute to complete. I confirmed the installation by running the following piece of code:

from rdkit import Chem

m = Chem.MolFromSmiles('Cc1ccccc1')
dir(m)
['AddConformer',
 'ClearComputedProps',
 'ClearProp',
 'Debug',
...
]

Make sure to enable Internet on your kernel before running the installation command.

vladkisin commented 5 years ago

Thanks a lot! You've made a great thing!