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

I can't install TenSEAL on Windows 11 #487

Closed
reaneling opened this issue Jul 31, 2024 · 1 comment · Fixed by #491
Closed

I can't install TenSEAL on Windows 11 #487

reaneling opened this issue Jul 31, 2024 · 1 comment · Fixed by #491
Labels
Build Related to the build of the package Type: Bug 🐛 Some functionality not working in the codebase as intended

Comments

@reaneling
Copy link

Description

SEAL and Cmake are installed. I tried all the commands offered in the instructions and which I found on the formula. In any case, the error is the same (except pip install tenseal)

My installation attempts

  1. pip install tenseal
    Error:
    ERROR: Could not find a version that satisfies the requirement tenseal (from versions: none) ERROR: No matching distribution found for tenseal
  2. pip install git+https://github.com/OpenMined/TenSEAL.git#egg=tenseal
  3. 'git clone https://github.com/OpenMined/TenSEAL.git' 'cd TenSEAL' 'pip install .'
    Error:
    `Collecting tenseal
    Cloning https://github.com/OpenMined/TenSEAL.git to c:\users\ea_or\appdata\local\temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552
    Running command git clone --filter=blob:none --quiet https://github.com/OpenMined/TenSEAL.git 'C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552'
    Resolved https://github.com/OpenMined/TenSEAL.git to commit 1348659
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Preparing metadata (pyproject.toml) ... done
    Building wheels for collected packages: tenseal
    Building wheel for tenseal (pyproject.toml) ... error
    error: subprocess-exited-with-error

× Building wheel for tenseal (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [189 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-312
creating build\lib.win-amd64-cpython-312\tenseal
copying tenseal\enc_context.py -> build\lib.win-amd64-cpython-312\tenseal
copying tenseal\version.py -> build\lib.win-amd64-cpython-312\tenseal
copying tenseal_init_.py -> build\lib.win-amd64-cpython-312\tenseal
creating build\lib.win-amd64-cpython-312\tenseal\sealapi
copying tenseal\sealapi_init_.py -> build\lib.win-amd64-cpython-312\tenseal\sealapi
creating build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\abstract_tensor.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\bfvtensor.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\bfvvector.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\ckkstensor.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\ckksvector.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors\plaintensor.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
copying tenseal\tensors_init_.py -> build\lib.win-amd64-cpython-312\tenseal\tensors
creating build\lib.win-amd64-cpython-312\tenseal\sealapi\util
copying tenseal\sealapi\util_init_.py -> build\lib.win-amd64-cpython-312\tenseal\sealapi\util
running build_ext
:41: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
-- Building for: Visual Studio 17 2022
-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22631.
-- The C compiler identification is MSVC 19.38.33130.0
-- The CXX compiler identification is MSVC 19.38.33130.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type (CMAKE_BUILD_TYPE): Release
-- Microsoft SEAL debug mode: OFF
-- SEAL_USE_CXX17: ON
-- SEAL_BUILD_DEPS: ON
-- SEAL_USE_MSGSL: ON
-- Microsoft GSL: download ...
CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
Calling FetchContent_Populate(msgsl) is deprecated, call
FetchContent_MakeAvailable(msgsl) instead. Policy CMP0169 can be set to
OLD to allow FetchContent_Populate(msgsl) to be called directly for now,
but the ability to call it with declared details will be removed completely
in a future version.
Call Stack (most recent call first):
build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/ExternalMSGSL.cmake:12 (FetchContent_Populate)
build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/SEALMacros.cmake:17 (include)
build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/CMakeLists.txt:150 (seal_fetch_thirdparty_content)
This warning is for project developers. Use -Wno-dev to suppress it.

  -- SEAL_USE_ZLIB: ON
  -- ZLIB: download ...
  CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1953 (message):
    Calling FetchContent_Populate(zlib) is deprecated, call
    FetchContent_MakeAvailable(zlib) instead.  Policy CMP0169 can be set to OLD
    to allow FetchContent_Populate(zlib) to be called directly for now, but the
    ability to call it with declared details will be removed completely in a
    future version.
  Call Stack (most recent call first):
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/ExternalZLIB.cmake:10 (FetchContent_Populate)
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/SEALMacros.cmake:17 (include)
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/CMakeLists.txt:169 (seal_fetch_thirdparty_content)
  This warning is for project developers.  Use -Wno-dev to suppress it.

  CMake Deprecation Warning at build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-build/thirdparty/zlib-src/CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  -- Looking for sys/types.h
  -- Looking for sys/types.h - found
  -- Looking for stdint.h
  -- Looking for stdint.h - found
  -- Looking for stddef.h
  -- Looking for stddef.h - found
  -- Check size of off64_t
  -- Check size of off64_t - failed
  -- Looking for fseeko
  -- Looking for fseeko - not found
  -- Looking for unistd.h
  -- Looking for unistd.h - not found
  -- Renaming
  --     C:/Users/ea_or/AppData/Local/Temp/pip-install-x35l6ndz/tenseal_f4cf4811fde34555a6232e36086f8552/build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-build/thirdparty/zlib-src/zconf.h
  -- to 'zconf.h.included' because this file is included with zlib
  -- but CMake generates it automatically in the build directory.
  -- SEAL_USE_ZSTD: ON
  -- Zstandard: download ...
  Версия MSBuild 17.8.3+195e7f5a3 для .NET Framework

  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: Промежуточный каталог или каталог выхода не может располагаться во временном каталоге, потому что это может стать причиной проблем с добавочной сборкой. [C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\ZERO_CHECK.vcxproj]
    1>Checking Build System
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: Промежуточный каталог или каталог выхода не может располагаться во временном каталоге, потому что это может стать причиной проблем с добавочной сборкой. [C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\zstd-populate.vcxproj]
    1>Creating directories for 'zstd-populate'
    Performing download step (git clone) for 'zstd-populate'
    Cloning into 'zstd-src'...
  CUSTOMBUILD : error : 1311 bytes of body are still expected [C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\zstd-populate.vcxproj]
    fetch-pack: unexpected disconnect while reading sideband packet
    fatal: early EOF
    fatal: fetch-pack: invalid index-pack output
    Cloning into 'zstd-src'...
    Had to git clone more than once: 2 times.
    HEAD is now at e47e674c Merge pull request #2995 from facebook/v1.5.2-rc
    Building Custom Rule C:/Users/ea_or/AppData/Local/Temp/pip-install-x35l6ndz/tenseal_f4cf4811fde34555a6232e36086f8552/build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-build/thirdparty/zstd-subbuild/CMakeLists.txt
    Performing update step for 'zstd-populate'
    -- Already at requested ref: e47e674cd09583ff0503f0f6defd6d23d8b718d3
    No patch step for 'zstd-populate'
    No configure step for 'zstd-populate'
    No build step for 'zstd-populate'
    No install step for 'zstd-populate'
    No test step for 'zstd-populate'
    Completed 'zstd-populate'
  C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5): error MSB8066: пользовательская сборка для "C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-download.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-update.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-patch.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-configure.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-build.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-install.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\e267e5ec4a37fecb86744921990363d0\zstd-populate-test.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\34dd7902409153f8a82c717288e9cf62\zstd-populate-complete.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeFiles\b926384001251007804d0f1083b6644e\zstd-populate.rule;C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\CMakeLists.txt" завершила работу с кодом -1. [C:\Users\ea_or\AppData\Local\Temp\pip-install-x35l6ndz\tenseal_f4cf4811fde34555a6232e36086f8552\build\temp.win-amd64-cpython-312\Release\_deps\com_microsoft_seal-build\thirdparty\zstd-subbuild\zstd-populate.vcxproj]

  CMake Error at C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1918 (message):
    Build step for zstd failed: 1
  Call Stack (most recent call first):
    C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
    C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
    C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:2145 (cmake_language)
    C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1978:EVAL:1 (__FetchContent_Populate)
    C:/Program Files/CMake/share/cmake-3.30/Modules/FetchContent.cmake:1978 (cmake_language)
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/ExternalZSTD.cmake:11 (FetchContent_Populate)
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/cmake/SEALMacros.cmake:17 (include)
    build/temp.win-amd64-cpython-312/Release/_deps/com_microsoft_seal-src/CMakeLists.txt:190 (seal_fetch_thirdparty_content)


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "C:\Users\ea_or\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\ea_or\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ea_or\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
      return _build_backend().build_wheel(wheel_directory, config_settings,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\build_meta.py", line 415, in build_wheel
      return self._build_with_temp_dir(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\build_meta.py", line 397, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\build_meta.py", line 497, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
      exec(code, locals())
    File "<string>", line 81, in <module>
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\__init__.py", line 108, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 184, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 200, in run_commands
      dist.run_commands()
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 970, in run_commands
      self.run_command(cmd)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\dist.py", line 945, in run_command
      super().run_command(command)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command
      cmd_obj.run()
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\command\bdist_wheel.py", line 373, in run
      self.run_command("build")
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\dist.py", line 945, in run_command
      super().run_command(command)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command
      cmd_obj.run()
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 316, in run_command
      self.distribution.run_command(command)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\dist.py", line 945, in run_command
      super().run_command(command)
    File "C:\Users\ea_or\AppData\Local\Temp\pip-build-env-up9ek7os\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 989, in run_command
      cmd_obj.run()
    File "<string>", line 46, in run
    File "<string>", line 77, in build_extension
    File "C:\Users\ea_or\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 413, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\ea_or\\AppData\\Local\\Temp\\pip-install-x35l6ndz\\tenseal_f4cf4811fde34555a6232e36086f8552', '-DSEAL_USE_INTEL_HEXL=OFF', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\ea_or\\AppData\\Local\\Temp\\pip-install-x35l6ndz\\tenseal_f4cf4811fde34555a6232e36086f8552\\build\\lib.win-amd64-cpython-312', '-DPYTHON_EXECUTABLE=C:\\Users\\ea_or\\AppData\\Local\\Programs\\Python\\Python312\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\ea_or\\AppData\\Local\\Temp\\pip-install-x35l6ndz\\tenseal_f4cf4811fde34555a6232e36086f8552\\build\\lib.win-amd64-cpython-312', '-A', 'x64']' returned non-zero exit status 1.
  [end of output]

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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (tenseal)`

System Information

  • OS: Windows
  • OS Version: 11
  • Language Version: Python 3.12.4
  • Package Manager Version: pip 24.2
@reaneling reaneling added the Type: Bug 🐛 Some functionality not working in the codebase as intended label Jul 31, 2024
@vanvu322
Copy link

vanvu322 commented Sep 21, 2024

same problem.
but when I using python 3.7, I can install tenseal

@philomath213 philomath213 added the Build Related to the build of the package label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Related to the build of the package Type: Bug 🐛 Some functionality not working in the codebase as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants