Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

RDKit installation under Windows and Python3.7.4

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.

like image 699
theozh Avatar asked Jul 19 '19 10:07

theozh


People also ask

How do I install RDKit on Windows?

Linux, Windows, and macOS RDKit platform wheels are available at the rdkit PyPi repository for all major Python versions. You can install RDKit using pip. Build information and details can be found at the https://github.com/kuelumbus/rdkit-pypi GitHub page.

What is RDKit Python?

RDKit is a collection of cheminformatics and machine-learning software written in C++ and Python. BSD license - a business friendly license for open source. Core data structures and algorithms in C++ Python 3.x wrapper generated using Boost.Python.


1 Answers

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/[email protected]/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

like image 179
Oliver Scott Avatar answered Oct 25 '22 05:10

Oliver Scott