deepmodeling/Uni-Mol

No module named unicore.data

Closed this issue · 5 comments

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.

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

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

you can refer this: #179

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'

you can refer this: #179

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