Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError when running from Pyfhel import Pyfhel #233

Open
lynkos opened this issue Mar 15, 2024 · 3 comments
Open

ImportError when running from Pyfhel import Pyfhel #233

lynkos opened this issue Mar 15, 2024 · 3 comments
Labels

Comments

@lynkos
Copy link

lynkos commented Mar 15, 2024

Description
Trying to run code from steps 1-3 in Pyfhel's MultDepth and Relinearization tutorial results in an ImportError when running from Pyfhel import Pyfhel.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/kiran/Documents/workspace/Projects/Q-SECURE/project/test/test.py", line 5, in <module>
    from Pyfhel import Pyfhel
  File "/Users/kiran/miniconda3/envs/q-secure_env/lib/python3.11/site-packages/Pyfhel/__init__.py", line 1, in <module>
    from .Pyfhel import Pyfhel
ImportError: dlopen(/Users/kiran/miniconda3/envs/q-secure_env/lib/python3.11/site-packages/Pyfhel/Pyfhel.cpython-311-darwin.so, 0x0002): symbol not found in flat namespace '__ZN4seal13parms_id_zeroE'

Code To Reproduce Error
Activate conda virtual environment and install Pyfhel via pip. I also set/added the environment variables from Pyfhel's Installing a C/C++ Compiler instructions to my .bash_profile. Up until now, everything's fine. Running the following command is what produces the aforementioned errors:

python -m project.test.test

Expected behavior
Successfully run code from steps 1-3 in Pyfhel's MultDepth and Relinearization tutorial, with the described outputs printed to my terminal.

Setup:

  • OS: Sonoma 14.4
  • Python: 3.11.8
  • C compiler version: [Clang 14.0.6] on darwin
  • Pyfhel Version: 3.4.2
@lynkos lynkos added the bug label Mar 15, 2024
@ibarrond
Copy link
Owner

@lynkos The error indicates that SEAL library was not installed/found alongside Pyfhel.

How did you install Pyfhel? If possible, you could install it directly with pip instead of via conda, I recall some issues with the latter method.

@lynkos
Copy link
Author

lynkos commented Mar 30, 2024

Hi @ibarrond, thanks for reaching out!

How did you install Pyfhel? If possible, you could install it directly with pip instead of via conda, I recall some issues with the latter method.

I installed Pyfhel (in my conda environment) as described in README.md:

pip install Pyfhel

When that didn't work, I uninstalled it and reinstalled it by cloning the repo:

git clone --recursive https://github.com/ibarrond/Pyfhel.git
pip install .

Unfortunately, I still got the same error.

@tanish-malekar
Copy link
Contributor

Hi @lynkos were you able to resolve the issue? I am getting the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants