Rebecca
Rebecca

Reputation: 351

How to install a package rdkit from Conda with pip?

I am trying to install rdkit using pip3. But it doesn't work.

sudo pip3 install rdkit
Error:  Could not find a version that satisfies the requirement rdkit (from versions: )
No matching distribution found for rdkit

There is only apparently one option with conda

conda install -c rdkit rdkit

How can I install it with pip? Thanks

Upvotes: 9

Views: 18496

Answers (3)

jacobdavis
jacobdavis

Reputation: 77

Here is my solution

conda create -n rdkit -y # create new environment
conda activate rdkit # activate new environment
conda install -c conda-forge rdkit -y 
conda install -c anaconda openpyxl -y # optional: if there is an openpyxl error
conda install ipykernel -y # optional: It will be useful if you use jupyter

Upvotes: 0

Charlie Crown
Charlie Crown

Reputation: 1089

As of a week or two ago, you can install rdkit using pip

pip install rdkit-pypi
python -c "from rdkit import Chem; print(Chem.MolToMolBlock(Chem.MolFromSmiles('C1CCC1')))"

Upvotes: 8

Oliver Scott
Oliver Scott

Reputation: 1783

You cannot install rdkit with pip at the moment, either build from source or install using anaconda as recommended. Making rdkit installable with pip is tricky, see github issue

Upvotes: 3

Related Questions