9

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

Rebecca
  • 341
  • 1
  • 4
  • 12
  • Why not just follow their recommendation? http://www.rdkit.org/docs/Install.html#installation – merv Oct 02 '19 at 20:21
  • Which is the best way to install rdkit? I tried to install by the command `conda install -c conda-forge rdkit` or `conda install -c rdkit rdkit` but it showed conflict in a new conda environment with python=3.7. I also try to install by pip (`pip install rdkit`), but when I imported in python, it said "ModuleNotFoundError: No module named 'rdkit'". – M.Vu Apr 28 '23 at 08:21

3 Answers3

8

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')))"
Charlie Crown
  • 1,071
  • 2
  • 11
  • 28
  • ERROR: Could not find a version that satisfies the requirement rdkit-pypi – PascalIv Dec 13 '21 at 12:52
  • 1
    As of 2023, it is much simpler. One can install with pip like : `pip install rdkit` – Vandan Revanur Feb 13 '23 at 18:36
  • Build information and details can be found at the https://github.com/kuelumbus/rdkit-pypi GitHub page. Please open an issue directly at this Github page if you find something not working as expected. Note: Older versions of RDKit might be available at the rdkit-pypi PyPi repository. rdkit-pypi is the old name of RDKit at PyPi. – M.Vu Apr 28 '23 at 08:17
3

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

Oliver Scott
  • 1,673
  • 8
  • 17
0

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
jacobdavis
  • 35
  • 6
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 20 '23 at 00:48