Import ok do not work on Ubuntu 20.04

Hi,

I follow the insructions on documentation provided but “import ok” causes following errors on my system:

Traceback (most recent call last):
File “/home/kurtulus/Downloads/FrontPanel-Ubuntu20.04LTS-x64-5.2.4/API/Python3/SPAD_1/ok.py”, line 14, in swig_import_helper
return importlib.import_module(mname)
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1014, in _gcd_import
File “”, line 991, in _find_and_load
File “”, line 975, in _find_and_load_unlocked
File “”, line 657, in _load_unlocked
File “”, line 556, in module_from_spec
File “”, line 1166, in create_module
File “”, line 219, in _call_with_frames_removed
ImportError: libokFrontPanel.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/kurtulus/Downloads/FrontPanel-Ubuntu20.04LTS-x64-5.2.4/API/Python3/SPAD_1/main.py”, line 1, in
import ok
File “/home/kurtulus/Downloads/FrontPanel-Ubuntu20.04LTS-x64-5.2.4/API/Python3/SPAD_1/ok.py”, line 17, in
_ok = swig_import_helper()
File “/home/kurtulus/Downloads/FrontPanel-Ubuntu20.04LTS-x64-5.2.4/API/Python3/SPAD_1/ok.py”, line 16, in swig_import_helper
return importlib.import_module(’_ok’)
File “/usr/lib/python3.8/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ImportError: libokFrontPanel.so: cannot open shared object file: No such file or directory

For anyone trying to solve this porblem, it is actually very simple. You will just have to copy libokFrontPanel.so file to your python directory where the installation was achieved. in my case, it is ~/home/anaconda3/envs/myenv/lib

1 Like