hi, I am going to using the HPC system to test my code because the dataset volume is heavy.
I load python first in Lunix. the version of python is "Python 3.8.2 (default, Jul 31 2020, 20:59:58) [GCC 9.3.0] on Linux ".
Then I copy the pysmile_license.py, pysmile.pyd, pysmile.so file in the WinSCP as below figure1.
after that, I load python in lunix system. then I pip install some related packages include "pip install pysmile". then in python, I import pysmile and pysmile_license, it showed "ImportError: /home/yyang/pysmile.so: invalid ELF header". In figure 2.
Could you please tell me how can I deal with this problem? I need to created DBN in the lunix system.
thanks.
Yajie
import pysmile error in Lunix system
-
- Posts: 34
- Joined: Thu Mar 19, 2020 11:49 am
import pysmile error in Lunix system
- Attachments
-
- figure 2.png (63.07 KiB) Viewed 5257 times
-
- figure 1.png (66.46 KiB) Viewed 5257 times
-
- Site Admin
- Posts: 61
- Joined: Mon Nov 06, 2017 6:41 pm
Re: import pysmile error in Lunix system
It is probably a mismatch between the PySMILE and Python version installed.
Remove pysmile.so and pysmile.pyd from directory you are trying to run program, then uninstall locally cached PySMILE package by typing:
in your terminal.
Next, download recent version of PySMILE with command:
Python should show a successful download message - something like this:
If you do not get any errors at this stage you should be able to use PySMILE. Try it by typing e.g.
in Python console. Note that License file should be present in the folder.
I hope it helps.
Remove pysmile.so and pysmile.pyd from directory you are trying to run program, then uninstall locally cached PySMILE package by typing:
Code: Select all
python -m pip uninstall pysmile
Next, download recent version of PySMILE with command:
Code: Select all
python -m pip install --index-url https://support.bayesfusion.com/pysmile-A/ pysmile
Code: Select all
Collecting pysmile
Downloading https://support.bayesfusion.com/pysmile-A/pysmile/pysmile-1.6.0-cp27-cp27mu-linux_x86_64.whl (1.5 MB)
|████████████████████████████████| 1.5 MB 173 kB/s
Installing collected packages: pysmile
Successfully installed pysmile-1.6.0
Code: Select all
import pysmile
import pysmile_license
net = pysmile.Network()
I hope it helps.
-
- Posts: 34
- Joined: Thu Mar 19, 2020 11:49 am
Re: import pysmile error in Lunix system
I download the pysmile package in python and pysmile.so file in the download website page, and put the pysmile_license file in the WinSCP, then run my code in Lunix system. it showed "the ImportError: dynamic module does not define module export function (PyInit_pysmile)" as shown in the figure. Could you please tell where I was wrong?
Thanks very much!
Thanks very much!
- Attachments
-
- wrong.png (16.55 KiB) Viewed 4916 times
-
- Site Admin
- Posts: 61
- Joined: Mon Nov 06, 2017 6:41 pm
Re: import pysmile error in Lunix system
It seems you installed Pysmile package from official pip repository - it is package unrelated with our PySMILE.
First - you have to uninstall this package with command:
Next - remove pysmile.so file from your directory and install from our index by typing:
Command above should install PySMILE version matching with Python version on your Linux system.
If installation is successfull you can use PySMILE by simple import in your Python script.
First - you have to uninstall this package with command:
Code: Select all
pip uninstall pysmile
Code: Select all
pip install --index-url https://support.bayesfusion.com/pysmile-A/ pysmile
If installation is successfull you can use PySMILE by simple import in your Python script.
-
- Posts: 34
- Joined: Thu Mar 19, 2020 11:49 am
Re: import pysmile error in Lunix system
I uninstall pysmile first succesfully, then i remove the pysmile.so file out from WinSCP, then I download the pysmile by the code you sent to me"pip install --index-url https://support.bayesfusion.com/pysmile-A/ pysmile". it shown I download the pysmile package successfully as below figure 1. however, when i "import pysmile"and "import pysmile_license" in jupyter hub by access the lunix system, it shows error as below figure 1.
when i access the code package by putty access to the lunix system, i can import pysmile and import pysmile_license as figure 2. but i plan to access the lunix system by jupyter hub website. Could you please what should i do next?
when i access the code package by putty access to the lunix system, i can import pysmile and import pysmile_license as figure 2. but i plan to access the lunix system by jupyter hub website. Could you please what should i do next?
- Attachments
-
- 2.png (35.8 KiB) Viewed 4903 times
-
- error.png (59.73 KiB) Viewed 4903 times
-
- Site Admin
- Posts: 61
- Joined: Mon Nov 06, 2017 6:41 pm
Re: import pysmile error in Lunix system
Pip installs PySMILE from local cache. You have to uninstall PySMILE again (pip uninstall pysmile) and install with command: "pip install --no-cache-dir --index-url https://support.bayesfusion.com/pysmile-A/ pysmile"