Anna-Lischen Anna-Lischen - 1 year ago 210
Python Question

How to add RDKit to project in PyCharm?

So, I am trying to add RDKit to my project in PyCharm. I have found that if you are using interpreter

PyCharm will try to install stuff using the
. While, RDKit requires
. I have tried to change the interpreter to
, but
is either not on the list or it can't open the URL with the repo. Does anyone know how to fix that?

By the way, is it possible while keeping the interpreter
to make it use anything else (not
), while installing stuff?

Answer Source

I have finally found how to do that and it's not difficult at all:

  1. Install conda;
  2. Install RDKit, following these instructions
  3. Go to the preferences in PyCharm either like this:

enter image description here

or like this (you need a wrench):

enter image description here

  1. In the project interpreter select: ~/anaconda/envs/my-rdkit-env/bin/python

  2. Make sure you add or update the corresponding python paths to PATH, otherwise it wouldn't work.


  1. Tried to install fiona - success, so there's no impact on the installation;
  2. Tried the simple code: print('HELLO WORLD!') - worked
  3. Tried rdkit code

        from rdkit import Chem
        m = Chem.MolFromSmiles('Cc1ccccc1')

worked, the log: <rdkit.Chem.rdchem.Mol object at 0x101125080>

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download