TenSEAL icon indicating copy to clipboard operation
TenSEAL copied to clipboard

Failed to install TenSEAL on Macbook Air M2

Open SimengZhan opened this issue 1 year ago • 4 comments

Description

I want to install TenSEAL on my MacBook Air M2 trying to use pip. It reported

ERROR: Could not find a version that satisfies the requirement tenseal (from versions: none)

ERROR: No matching distribution found for tenseal

Then I tried to use the suggestions provided by the developer:

pip install git+https://github.com/OpenMined/TenSEAL.git#egg=tenseal

But it reported

note: This error originates from a subprocess, and is likely not a problem with pip.

  ERROR: Failed building wheel for tenseal

Failed to build tenseal

ERROR: Could not build wheels for tenseal, which is required to install pyproject.toml-based projects 

Also, I tried to install core library with "brew install cmake", and then input the following in my terminal:

git clone --recursive https://github.com/OpenMined/TenSEAL.git

cd TenSEAL/

git submodule init

git submodule update

pip install .

But it also reported note:

This error originates from a subprocess, and is likely not a problem with pip.

  ERROR: Failed building wheel for tenseal

Failed to build tenseal

ERROR: Could not build wheels for tenseal, which is required to install pyproject.toml-based projects

When I tried to install Tenseal with "pip install tenseal" on my lenovo book with Windows , it successed!

Expected Behavior

I don't know if there is any available version for MacOS with Apple M2 Silicon.

Screenshots

image image image

System Information

  • OS: macOS
  • OS Version: Ventura 13.4
  • Language Version: Python 3.12.0
  • Package Manager Version: pip 23.3.2, cmake 3.28.1

SimengZhan avatar Jan 03 '24 09:01 SimengZhan

Try to downgrade your python's version to 3.9. Hope this helps!

rayhankinan avatar Feb 26 '24 22:02 rayhankinan

Try to downgrade your python's version to 3.9. Hope this helps!

This actually solves the issue, at least for now.

Dawitkiros avatar Jul 11 '24 11:07 Dawitkiros

Try to downgrade your python's version to 3.9. Hope this helps!

This helped me install the library but upon running I got the following:

ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/_tenseal_cpp.cpython-39-darwin.so, 0x0002): tried: '/opt/homebrew/lib/python3.9/site-packages/_tenseal_cpp.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/python3.9/site-packages/_tenseal_cpp.cpython-39-darwin.so' (no such file), '/opt/homebrew/lib/python3.9/site-packages/_tenseal_cpp.cpython-39-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e' or 'arm64'))

tanish-malekar avatar Jul 21 '24 13:07 tanish-malekar