Reputation: 75
I have had a lot of trouble trying to install RDKit using python3 and Ubuntu 20.04 LTS Tried to install rdkit this way:
sudo apt-get install python3-rdkit
But then when I try to import it using python3 it doesn't work. It installed indeed, but it is not in the package-list. Neither I can import it after using for example:
from rdkit import Chem
The official web (https://www.rdkit.org/docs/Install.html) site does have the following installation sentence, but it didn't work:
sudo apt-get install python-rdkit librdkit1 rdkit-data
I will appreciate any help!
Upvotes: 5
Views: 4391
Reputation: 320
When apt installs python3-rdkit it puts the packages in /usr/lib/python3/dist-packages/rdkit
, which Python doesn't seem to pick up. I symlinked that folder to the site-packages folder with:
cd /usr/local/lib/python3.9/site-packages/
ln -s /usr/lib/python3/dist-packages/rdkit .
and then I could import rdkit in python.
Note: running apt show python3-rdkit
shows that the package is currently for Python 3.9
Upvotes: 0
Reputation: 846
After you've created and activated your conda environment, run:
conda install -c conda-forge rdkit
Ref: https://anaconda.org/conda-forge/rdkit
Upvotes: 3
Reputation: 7622
I'm not sure rdkit is actually compatible with python 3.8 yet. For example there are no python 3.8 build on conda channel.
Upvotes: 0