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

'tenseal._tenseal_cpp' Module Not Found #498

Open
DRKorossy opened this issue Oct 14, 2024 · 0 comments
Open

'tenseal._tenseal_cpp' Module Not Found #498

DRKorossy opened this issue Oct 14, 2024 · 0 comments
Labels
Type: Question ❔ Question about implementation or some technical aspect

Comments

@DRKorossy
Copy link

DRKorossy commented Oct 14, 2024

Question

How do I fix a ModuleNotFoundError when trying to import tenseal?

Further Information

In a nutshell, I'm getting a ModuleNotFoundError for 'tenseal._tenseal_cpp' and I don't know how to start working with the tenseal library.

To elaborate, find the program that I'm trying to run and the full error message below:

Programme:
- name: fhe.py
- contents:
import tenseal as ts
print("hello, world")

[...path...]/venv/lib/python3.12/site-packages/tenseal/__init__.py", line 5, in
import _tenseal_cpp as _ts_cpp
ImportError: dlopen([...path...]/venv/lib/python3.12/site-packages/_tenseal_cpp.cpython-312-darwin.so, 0x0002): tried: '[...path...]/venv/lib/python3.12/site-packages/_tenseal_cpp.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/[...path...]/venv/lib/python3.12/site-packages/_tenseal_cpp.cpython-312-darwin.so' (no such file), '[...path...]/venv/lib/python3.12/site-packages/_tenseal_cpp.cpython-312-darwin.so' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "[...path...]/fhe.py", line 1, in
import tenseal as ts
File "[...path...]/venv/lib/python3.12/site-packages/tenseal/__init__.py", line 7, in
import tenseal._tenseal_cpp as _ts_cpp
ModuleNotFoundError: No module named 'tenseal._tenseal_cpp'

System Information

  • OS: iOS (13 inch MacBook Pro 2020)
  • CPU: 2 GHz Quad-Core Intel Core i5 (2020 model, before the M1 chips were introduced)
  • OS Version: Sonoma
  • Language Version: Python 3.12
  • Package Manager Version: pip

Additional Context

The error message mentions "have 'arm64', need 'x86_64h' or 'x86_64'". However, when checking using: uname -m
I get: x86_64. So I don't have arm64. My guess is that either the programme is unable to identify the x86_64 as it is, or there are missing files from the library.

I'd appreciate any and all support, thanks.

@DRKorossy DRKorossy added the Type: Question ❔ Question about implementation or some technical aspect label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question ❔ Question about implementation or some technical aspect
Projects
None yet
Development

No branches or pull requests

1 participant