Here are the steps to install RDKit in the Virtual environment. I used Ubuntu 16.04
- Create virtual environment, for which a create directory and make VM on it.
mkdir VM1
python -m virtualenv VM1 (python3 -m virtualenv VM1 )
- Activate the virtual environment
source ~/VEs/VM1/bin/activate
- Requisites of RDKit from pip
(pip3 install numpy matplotlib boost yapf coverage cmake pandas)
- Packages needed for the installation of boost
sudo apt install build-essential python-numpy cmake python-dev sqlite3 libsqlite3-dev libboost-dev libboost-system-dev libboost-thread-dev libboost-serialization-dev libboost-python-dev libboost-regex-dev
(sudo apt install build-essential python3-numpy cmake python3-dev sqlite3 libsqlite3-dev libboost-dev libboost-system-dev libboost-thread-dev libboost-serialization-dev libboost-python-dev libboost-regex-dev)
(sudo apt install build-essential python3-numpy cmake python3-dev sqlite3 libsqlite3-dev libboost-dev libboost-system-dev libboost-thread-dev libboost-serialization-dev libboost-python-dev libboost-regex-dev)
- Installation of boost in virtual environment
tar zxvf boost_1_66_1.tar.gz
cd boost_1_66_1
- Bootstrapping boost in the VE location
./bootstrap.sh --prefix=/home/CD/CLPB/VEs/VM1 (here prefix path is location where lib directory exists in VE)
- Building boost
./b2 (this step takes a while to complete)
- SWIG installation, download it from here (into tools directory under VE - used this option just to keep all the tools together).
tar zxvf swig-3.0.12.tar.gz
cd swig-3.0.12
./configure --prefix=/home/CD/CLPB/VEs/VM1 (here prefix path is location where lib directory exists in VE)
make -j 6 (to let use the process 6 cpus)
make check (check will take a while as it checks multiple languages compatibility)
make install
- Packages need for RDKit in ubuntu
sudo apt install doxygen
- Download latest RDKit from tags
cp rdkit-Release_2017_09_3.tar.gz /home/CD/CLPB/VEs/VM1/
cd /home/CD/CLPB/VEs/VM1/
cd /home/CD/CLPB/VEs/VM1/
tar zxvf rdkit-Release_2017_09_3.tar.gz
mv rdkit-Release_2017_09_3 RDKit
- Paths are set in /home/CD/CLPB/VEs/VM1/bin/activate file where the Virtual environment activate file exists.
########## Paths for RDKit
export RDBASE="/home/CD/CLPB/VEs/VM1/RDKit"
export PYTHONPATH="$RDBASE:/home/CD/CLPB/VEs/VM1/lib:/home/CD/CLPB/VEs/VM1/local/lib:/home/CD/CLPB/VEs/VM1/bin/python2.7"
export LD_LIBRARY_PATH="$RDBASE/lib"
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
export RDBASE="/home/CD/CLPB/VEs/VM1/RDKit"
export PYTHONPATH="$RDBASE:/home/CD/CLPB/VEs/VM1/lib:/home/CD/CLPB/VEs/VM1/local/lib:/home/CD/CLPB/VEs/VM1/bin/python2.7"
export LD_LIBRARY_PATH="$RDBASE/lib"
export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"
- Building RDKit
cd RDKit
mkdir build
cd build
- cmake options to install in VE and use the Boost libraries which are installed in VE
cmake -DBOOST_ROOT=/home/CD/CLPB/VEs/VM1/lib -DCMAKE_INSTALL_PREFIX=/home/CD/CLPB/VEs/VM1 .. (cmake command is complete one command at a time)
- Make the RDKit installation
make -j 6 (to let use the process 6 cpus)
make install
- Test the installation with ctest
ctest