Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to import PygPCQN4MDataset #43

Open
aahad5555 opened this issue Dec 1, 2021 · 10 comments
Open

unable to import PygPCQN4MDataset #43

aahad5555 opened this issue Dec 1, 2021 · 10 comments

Comments

@aahad5555
Copy link

hi, I am having trouble importing PygPCQN4MDataset, I ran the following line of code from ogb.lsc.pcqm4m_pyg import PygPCQM4MDataset and it threw this error ImportError: cannot import name 'smiles2graph' from 'ogb.utils' (/usr/local/lib/python3.7/dist-packages/ogb/utils/__init__.py). I am trying to run it the code on colab and fulfilled requirements of code but this error poped up.

@zhengsx
Copy link
Contributor

zhengsx commented Dec 2, 2021

It seems an exteranl dependence problem. Do you use the required environment?

@aahad5555
Copy link
Author

yes, I installed everything that was recommended. Is it something to do with colab?

@zhengsx
Copy link
Contributor

zhengsx commented Dec 2, 2021

We have not tested our code on colab. If I remember right, colab will pre-install several commonly-used depencencies, which might cause a version conflict. Maybe you can try in a clean conda environment or a docker.

@aahad5555
Copy link
Author

okay I will check it. Thanks for the timely reply. It means a lot.

@shiokoo
Copy link

shiokoo commented Dec 21, 2021

okay I will check it. Thanks for the timely reply. It means a lot.

Did you solve it? I also encountered this problem.

@aahad5555
Copy link
Author

@shiokoo yeah, if you are working on colab than don't install requirements at once. Only install packages which are not preinstalled on colab plus it seemed I didn't installed rdkit .

@shiokoo
Copy link

shiokoo commented Dec 21, 2021

@shiokoo yeah, if you are working on colab than don't install requirements at once. Only install packages which are not preinstalled on colab plus it seemed I didn't installed rdkit .

Oh, I try it on PyCharm, although I install rdkit, the error still exists. Anyway, thanks you a lot.

@laowu-code
Copy link

@shiokoo
Sorry to bother you,I encountered the same error,how did you solve it? Thanks a lot.

@shiokoo
Copy link

shiokoo commented Jul 26, 2022

@shiokoo Sorry to bother you,I encountered the same error,how did you solve it? Thanks a lot.

yeah, I solved it. This may be a version problem of rdkit that rdkit.Chem can't be imported. You can re-install rdkit, using following command:

conda install rdkit -c conda-forge

after that, if you still have some bugs, maybe the following command will help you.

apt-get install libxrender1

@laowu-code
Copy link

@shiokoo Sorry to bother you,I encountered the same error,how did you solve it? Thanks a lot.

yeah, I solved it. This may be a version problem of rdkit that rdkit.Chem can't be imported. You can re-install rdkit, using following command:

conda install rdkit -c conda-forge

after that, if you still have some bugs, maybe the following command will help you.

apt-get install libxrender1

Thank you for your prompt response, it means a lot to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants