snap-stanford / ogb

Benchmark datasets, data loaders, and evaluators for graph machine learning
https://ogb.stanford.edu
MIT License
1.89k stars 397 forks source link

ImportError: cannot import name 'smiles2graph' from 'ogb.utils' #391

Closed viktor-ktorvi closed 1 year ago

viktor-ktorvi commented 1 year ago

Hi,

I'm unable to import smiles2graph. I've tried installing rdkit and even multiple versions of it but without result. I'm on torch 1.10.2, cuda 11.3, pyg 2.0.4 and Windows 10.

from ogb.utils import smiles2graph ImportError: cannot import name 'smiles2graph' from 'ogb.utils'

weihua916 commented 1 year ago

You need to install rdkit to use the molecule data.

viktor-ktorvi commented 1 year ago

Hi, thanks for the reply. As I've said I already did install rdkit(even tried multiple versions). Even so the error persists. Do you have any idea what the problem could be?

viktor-ktorvi commented 1 year ago

Here's an update: if I remove the try-except block in the utils/init.py file I get the following error:

from rdkit.Chem.rdmolfiles import *
ImportError: DLL load failed while importing rdmolfiles: The specified procedure could not be found.
viktor-ktorvi commented 1 year ago

I've tried the command from this thread but with no success.

weihua916 commented 1 year ago

This seems not related to our package. You should consult with rdkit to install it properly.