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

No module named unicore.data #180

Open
Zephyr271828 opened this issue Nov 16, 2023 · 5 comments
Open

No module named unicore.data #180

Zephyr271828 opened this issue Nov 16, 2023 · 5 comments

Comments

@Zephyr271828
Copy link

Thank you for this wonderful model! However, when I executed the Python command

from unimol_tools import MolTrain 

An error occurred:

ModuleNotFoundError: No module named 'unicore.data'

I'm 100% sure that I have installed the unicore package because when I import unicore the program will not throw an error. I searched for documents about unicore and unicore.data but did not get useful results. Therefore, I wonder if you can help me check this problem.

@Naplessss
Copy link
Contributor

Hi, does from unicore.data import Dictionary work? and you can attach more details about this.

@Zephyr271828
Copy link
Author

Thank for your reply! However, it still doesn't work, with "ModuleNotFoundError: No module named 'unicore.data'".

@Naplessss
Copy link
Contributor

you can refer this: #179

@Zephyr271828
Copy link
Author

Below are my code and the entire exception information:

import os
import unicore
from unicore import *

os.environ['KMP_DUPLICATE_LIB_OK']='True'

from unicore.data import Dictionary

from unimol_tools import MolTrain
from unimol_tools import MolPredict

Exception:

Traceback (most recent call last):
  File "/Users/zephyr/Desktop/Work/Uni-Mol/Uni-Mol/unimol_tools/test.py", line 2, in <module>
    import unicore
ModuleNotFoundError: No module named 'unicore'
(base) zephyr@xuyufengdeMacBook-Pro Uni-Mol % conda activate my-rdkit-env
(my-rdkit-env) zephyr@xuyufengdeMacBook-Pro Uni-Mol % cd unimol_tools 
(my-rdkit-env) zephyr@xuyufengdeMacBook-Pro unimol_tools % ls
MANIFEST.in             requirements.txt        unimol_tools
README.md               setup.py                unimol_tools.egg-info
build                   test.ipynb
dist                    test.py
(my-rdkit-env) zephyr@xuyufengdeMacBook-Pro unimol_tools % python test.py
Traceback (most recent call last):
  File "/Users/zephyr/Desktop/Work/Uni-Mol/Uni-Mol/unimol_tools/test.py", line 7, in <module>
    from unicore.data import Dictionary
ModuleNotFoundError: No module named 'unicore.data'

@Zephyr271828
Copy link
Author

you can refer this: #179

Thank you for your help! Will check if it works.

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

2 participants