MDIL-SNU / SIMPLE-NN

SIMPLE-NN(SNU Interatomic Machine-learning PotentiaL packagE – version Neural Network)
GNU General Public License v3.0
47 stars 23 forks source link

Error: No module named 'simple_nn.utils._libgdf' #65

Closed vsumaria closed 5 years ago

vsumaria commented 5 years ago

I used the install procedure mentioned in the documentation. When trying to import Simple_nn (from simple_nn import Simple_nn), I am getting the following error:

File "............/softwares/SIMPLE-NN/simple_nn/utils/init.py", line 5, in from ._libgdf import lib, ffi ModuleNotFoundError: No module named 'simple_nn.utils._libgdf'

Can you please help me fix this issue ?

Nanco-L commented 5 years ago

The module simple_nn.utils._libgdf is C++ implementation and automatically complied during the install process. So, please check the installation process (did you use python setup.py install command?) and the location you run python. If you do not use the installation command, libgdf module is not generated. And, if you try the test in the cloned directory from Github, simple_nn in the cloned directory is imported priory to installed simple_nn. Thus, it also leads to ModuleNotFoundError. If you check these two things above and the error still exists, please let me know.

vsumaria commented 5 years ago

I did you the install command: python setup.py install —user

Do I need to add any folder to the python path after I do that? I added the SIMPLE-NN main folder to python path .

Vaidish

On Sep 6, 2019, at 7:57 PM, Kyuhyun Lee notifications@github.com wrote:

The module simple_nn.utils._libgdf is C++ implementation and automatically complied during the install process. So, please check the installation process (did you use python setup.py install command?) and the location you run python. If you do not use the installation command, libgdf module is not generated. And, if you try the test in the cloned directory from Github, simple_nn in the cloned directory is imported priory to installed simple_nn. Thus, it also leads to ModuleNotFoundError. If you check these two things above and the error still exists, please let me know.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

Nanco-L commented 5 years ago

No. you do not need to add the path. Like pip install, python setup.py install --user command install simple-nn in your local directory (in common, ~/.local/lib/pythonX.X/site-packages/simple_nn~). Thus, no additional process is required. But as I mentioned above, if you try to import simple_nn in the cloned directory from Github, simple_nn in the cloned directory is imported instead of installed simple_nn. So, please try to import simple_nn in another directory and remove the path for the simple-nn main folder you added.

vsumaria commented 5 years ago

It's weird, using just the installation command, it worked on one of the clusters I use, not on the other. Only difference is one is python2.7 (on which it worked) and python3.7 (on which it didn't work) ..

Nanco-L commented 5 years ago

Does the same error occur in python 3.7 cluster? If it does, we will check the libgdf compilation in python 3.7 environments soon. And if another error occurs in your python 3.7 cluster, please let me know. p.s. Officially, simple_nn supports python 2.7 and python 3.4~3.6.

vsumaria commented 5 years ago

It seems to work with 3.7, but there are some warnings that I get, but that is due to some compatibility issue btw tensorflow and numpy 1.17

If I find any other issues, I will report it here.

Thanks a lot Kyuhyun

On Sep 6, 2019, at 9:19 PM, Kyuhyun Lee notifications@github.com wrote:

Does the same error occur in python 3.7 cluster? If it does, we will check the libgdf compilation in python 3.7 environments soon. And if another error occurs in your python 3.7 cluster, please let me know. p.s. Officially, simple_nn supports python 2.7 and python 3.4~3.6.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MDIL-SNU/SIMPLE-NN/issues/65?email_source=notifications&email_token=AH6KLSOABHEGGVR2233J33TQIMTUVA5CNFSM4IUOFDG2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6EPWWI#issuecomment-529070937, or mute the thread https://github.com/notifications/unsubscribe-auth/AH6KLSNR6GTZEXTEXY5IVHLQIMTUVANCNFSM4IUOFDGQ.