Hey guys, here I would like to explain to you how to do a clean install of deepchem for you to use. Unfortunately tthe explination on the deepchem page is not quite sufficient to completely install and does still require some additional downloads and tweaks. Lets get started!


Terminal Load Screen


Begin with a Clean Install

1. To begin this tutorial I will state that I performed all these tasks on a new ubuntu installation with minimum features running on a virtual box simulator. I would suggest that you do the same as well.

Pre Deepchem Dependencies

2. Pre-deepchem installations
A new version of Ubuntu requires quite a few additions to install deepchem.

Installing Git

First we need to install git that is used to install other packages that we will need for the installation.

Sudo apt install git 

Installing Miniconda

After git we need to download and install miniconda which is a package manager that contains conda and its dependencies.

wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh

Restart Terminal

After installing Miniconda its necessary to restart the terminal for the changes to take effect.

Installing Anaconda

Next we need to install Anaconda which contains about a hundred packages that will be used by deepchem (numpy is one of them). We can use the newly isntalled mini conda to isntall Anaconda.

conda install -c anaconda python

Installing Cython

The last of the pre-deepchem dependencies that are needed is the Cython package that attempts to give python some of the efficiency that C posses.

Pip install cython

Install Deepchem


Now that we have all the dependencies squared away we can start installing deepchem. At this point we do follow the steps provided on their main website but I will still explain what each of the steps does so that the reason behind each step becomes clear.

File Window on Deepchem

Clone Deepchem

This step will clone or download the latest branch of deepchem into whatever folder you are currently in.

git clone https://github.com/deepchem/deepchem.git

Cd into Deepchem

A very simple step, you just need to move into the deepchem folder so that we can more directly interact with the built in install scripts.

git clone https://github.com/deepchem/deepchem.git

Clone Deepchem

This step will clone or download the latest branch of deepchem into whatever folder you are currently in.

cd deepchem

Install Deepchem

This install program actually uses a programming environment to install deepchem and deepchem dependencies into. This is a very useful feature that isolates the specific packages and code that will be running deepchem from the rest of the machine.

bash scripts/install_deepchem_conda.sh deepchem

Activate the Deepchem Source Code

Now we activate the source environment for deepchem called “deepchem”. Typing source deactivate deepchem. Will exist the deepchem environment

source activate deepchem

Setup Deepchem on Deepchem Environment

Now that we have deepchem installed we need to actually make it usable in the deepchem environment. This code will allow you to actually run deepchem in the environment as it is not set up outside of the environment. Try using this code outside of the environment if you want it to not use the environment and instead be in the base code of your system.

python setup.py install

Testing Deepchem


File Window on Deepchem

After it is installed and setup, it is time to test the programs themselves.

Cd examples

Now we have to run the code. The test code runs two example programs, Tox21 and Adme. Unfortunately the Adme code requires data from an amazon web server that they are no longer supporting and will fail. The Tox21 code however will run. If you are interested in Tox21 I have written an entire article on this code alone, go check it out!

Categories: deepchem