You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...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.
The text was updated successfully, but these errors were encountered:
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
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.
The text was updated successfully, but these errors were encountered: