RDKit functionality rom Python Script failed

Hi all,

I am trying to use RDKit functionality from a Python Script node. I am gettig an error message: 'ImportError: DLL load failed: The specified module could not be found.'

I am using Knime verison 2.12.2. I installed Anaconda (to Z:\PythonAnaconda\pywin27) following the instructions provided on https://www.knime.org/blog/how-to-setup-the-python-extension. Environment variables are set as follows:

RDBASE = Z:\PythonAnaconda\pywin27

PYTHONPATH = %RDBASE%

PATH = ; %RDBASE%\lib

To test the installation I used a Python Script node with the following code:

# imports 
from rdkit import Chem
import numpy
from pandas import DataFrame
 
output_table = DataFrame(input_table['BMS'])
output_table['Copy_BMS'] = input_table['BMS']

In the node window a message appears: 'Starting python...' and then 'Successfully loaded input data into python'.

Executing the script resulted in this error message:

Traceback (most recent call last):
  File "C:\Program Files\KNIME_2.11.2\plugins\org.knime.python_2.12.0.0047785\py\PythonKernel.py", line 282, in execute
    exec(source_code, _exec_env, _exec_env)
  File "<string>", line 2, in <module>
  File "Z:\PythonAnaconda\pywin27\lib\site-packages\rdkit\Chem\__init__.py", line 18, in <module>
    from rdkit import rdBase
ImportError: DLL load failed: The specified module could not be found.

Any ideas how to solve this issue? Have I missed a step during the setup? Any help is highly appreciated :)

cheers

aziza

 

 

 

Hi Aziza,

Assuming that you installed the RDKit in your anaconda environment using conda install -c rdkit rdkit (which I would strongly suggest), then I'd suggest getting rid of the changes that you made to your environment (you don't need the RDBASE variable or changes to PYTHONPATH or PATH).

-greg

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.