Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 538
Rebecca Avatar asked Oct 02 '19 10:10

Rebecca


People also ask

Can I use pip to install packages in conda?

You can install pip in the current conda environment with the command conda install pip , as discussed in Using pip in an environment. If there are instances of pip installed both inside and outside the current conda environment, the instance of pip installed inside the current conda environment is used.

What is RDKit package?

RDKit is a collection of cheminformatics and machine-learning software written in C++ and Python. BSD license - a business friendly license for open source.

How does conda work with pip?

The fundamental difference between pip and Conda packaging is what they put in packages. Pip packages are Python libraries like NumPy or matplotlib . Conda packages include Python libraries (NumPy or matplotlib ), C libraries ( libjpeg ), and executables (like C compilers, and even the Python interpreter itself).


Video Answer


2 Answers

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')))"
like image 193
Charlie Crown Avatar answered Oct 27 '22 11:10

Charlie Crown


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

like image 30
Oliver Scott Avatar answered Oct 27 '22 09:10

Oliver Scott