8

RDKit could be a nice package if it wasn't so complicated to install. Here on SO, there are several questions having problems with the installation of RDKit. However, on different operating systems or different environments.

My configuration is: Win10, Python 3.7.4, pip is installed, PATH is set, PYTHONPATH is set. The installation of other modules is working fine via python -m pip install <package>.

I'm aware that the site recommends the fastest installation with Anaconda. However, I don't have and don't want Anaconda.

On the webpage it says: "Get the appropriate windows binary build from: https://github.com/rdkit/rdkit/releases". However, there are no binaries of the latest versions.

This means, I would have to build it from source. I'm hesitating because the process seems to be pretty complicated, many extra installations with new problems and unknowns, and furthermore, the instructions seem to be outdated and incomplete for somebody who would build binaries from the source for the first time.

So, then I tried some unofficial binaries of RDKit.

If I unpack them and set the paths according to instructions, I get this error message:

>>> from rdkit import Chem
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\xyz\Programs\RDKit\rdkit\__init__.py", line 2, in <module>
    from .rdBase import rdkitVersion as __version__
ImportError: DLL load failed: The specified module could not be found.

So, finally my questions:

  • How to properly install RDKit with the above mentioned configuration?
  • What is the specified DLL which is missing?
  • Where is it expecting it and searching it?
  • Are these RDKit 3.6 binaries maybe incompatible with Python 3.7.4?

I'm pretty sure it is probably a "small" thing (a path here or a check there), but I'm stuck. Thank you for any hints.

Update:

Apparently, it is not just a "small" thing. Chances to get this to work are most likely very low. In the meantime I found this:

https://github.com/rdkit/rdkit/issues/1812

https://github.com/rdkit/rdkit/issues/2389

If the author of rdkit writes (April 2019):

I would be happy to be able to do pip distributions of the RDKit, but to the best of my knowledge no one has managed to figure out how to make it actually work.

I'd be happy to accept a PR from someone who has figured this out, but I am not likely to have the time to do this myself anytime in the near future.

So, if anybody feels capable achieving this, please feel free. I will invest time in something else or will have to switch to Anaconda if I want to use RDKit.

theozh
  • 22,244
  • 5
  • 28
  • 72
  • I completely agree with your sentiments regarding the difficulty installing RDKit and not wanting to use conda. I have found an alternative that has met my needs in the Indigo Toolkit (https://lifescience.opensource.epam.com/indigo/) and have used it in Windows 10 with python 3.7.4. – BalooRM May 03 '20 at 16:03

2 Answers2

1

On the webpage you linked there is a section about missing DLLs:

"In Win7 systems, you may run into trouble due to missing DLLs, see one thread from the mailing list: http://www.mail-archive.com/rdkit-discuss@lists.sourceforge.net/msg01632.html You can download the missing DLLs from here: http://www.microsoft.com/en-us/download/details.aspx?id=5555"

Not sure if this helps

Oliver Scott
  • 1,673
  • 8
  • 17
  • Thank you for checking. This link is about Microsoft Visual C++ redistributables. They are all installed 2008, 2010, 2012, 2013, 2015 and 2015-2019. I don't understand why these error messages don't tell you what is missing where. – theozh Jul 22 '19 at 11:58
  • Sorry It didn't help, although I did also come across this while searching; "Copy MSVCP100.DLL and MSVCR100.DLL into %RDBASE%\lib\" – Oliver Scott Jul 22 '19 at 12:43
1

Just for closing this question...

In the meantime, it seems installation of RDKit can be done without conda. At least, I succeeded with Python 3.7.4 and 3.11.1 (64 bit), but not with Python 3.6.3 (32 bit)

pip install rdkit

See updates on: https://github.com/rdkit/rdkit/issues/1812

and the comment from @VandanRevanur in 2023 here: How to install a package rdkit from Conda with pip?

theozh
  • 22,244
  • 5
  • 28
  • 72