Traceback (most recent call last):
File “”, line 1027, in _find_and_load
File “”, line 1006, in _find_and_load_unlocked
File “”, line 688, in _load_unlocked
File “”, line 883, in exec_module
File “”, line 241, in _call_with_frames_removed
File “/home//PycharmProjects/HETest/.venv/lib/python3.10/site-packages/openfhe/init.py”, line 1, in
from .openfhe import *
ImportError: /home//PycharmProjects/HETest/.venv/lib/python3.10/site-packages/openfhe/openfhe.so: undefined symbol: _ZN8lbcrypto12DCRTPolyImplIN9bigintdyn9mubintvecINS1_5ubintImEEEEE2atEj
I am not aware of any issues at the moment. Are you using the main branches of both OpenFHE and OpenFHE-Python? What OS and compilers are you using? Are you using the system-level or conda installation instructions?
The error you included seems to indicate an incompatibility between the .so files for OpenFHE and the Python wrapper. Please confirm you install the latest versions on your system (v1.1.4 and v0.8.6 for OpenFHE and Python wrapper, accordingly).
I also got the same error on arch, I installed both from their respective github repos. I should also note that I’m running pycharm, so it’s possible that it might have something to do with the venv.
However If I run from my terminal I get other error (c++ openfhe works fine):
Apparently, for the terminal error, you need to add the path of OpenFHE to your LD_LIBRARY_PATH.
Use the following: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/openfhe/library
Got it working nicely with Autocompletion and everything. Here’s how to do it:
Install OpenFHE trough the IDE package manager
Copy your built openfhe .so file () to the openfhe folder inside the .venv folder
Rename said file to openfhe.so (mine was openfhe.cpython-311-x86_64-linux-gnu.so), delete the installed by ide first
Create a custom configuration for your run file on the IDE with this env variable (LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/openfhe/library/),
It should look something like this:
Hi @ypolyakov, I am using the main branches and the latest versions are installed - v1.1.4 and v0.8.6 for OpenFHE and Python wrapper, respectively. Also, I am using Ubuntu 22.04.4 and the system-level installation. It still does not work.