Posts

Showing posts from August, 2023

[How To] Install SEAL-Python In macOS

Image
Run the following commands from the Terminal in the given order: 1. brew install cmake autoconf automake libtool shtool gflags 2. xcode-select --install 3. git clone https://github.com/Huelse/SEAL-Python.git 4. cd SEAL-Python 5. pip3 install numpy pybind11 6. git submodule update --init --recursive 7. cd SEAL 8. cmake -S . -B build -DSEAL_USE_MSGSL=OFF -DSEAL_USE_ZLIB=OFF -DSEAL_THROW_ON_TRANSPARENT_CIPHERTEXT=OFF -DCMAKE_C_COMPILER=/usr/local/Cellar/llvm/16.0.1/bin/clang -DCMAKE_CXX_COMPILER=/usr/local/Cellar/llvm/16.0.1/bin/clang++ 9. cmake --build build 10. cd .. 11. python3 setup.py build_ext -i 12. cp seal.*.so examples 13. cd examples 14. python3 4_bgv_basics.py This guide installs SEAL-Python on macOS, the Python binding for Microsoft SEAL, by installing the build tools, cloning the project with its submodules, and building the wrapper. Microsoft SEAL is a homomorphic encryption library. Homomorphic encryption lets you compute on encrypted data without decrypting it. The buil...

[Solved] Fix "ld: library not found for -lc++" errors in macOS

Image
Linker Error: Run Build Command(s):/usr/local/Cellar/cmake/3.26.3/bin/cmake -E env VERBOSE=1 /usr/local/bin/gmake -f Makefile cmTC_2eb92/fast && /usr/local/bin/gmake   -f CMakeFiles/cmTC_2eb92.dir/build.make CMakeFiles/cmTC_2eb92.dir/build     gmake[1]: Entering directory '/Users/devharsh/Downloads/SEAL-Python/SEAL/build/CMakeFiles/CMakeScratch/TryCompile-p29bdr'     Building CXX object CMakeFiles/cmTC_2eb92.dir/testCXXCompiler.cxx.o     /Library/Developer/CommandLineTools/usr/bin/c++     -MD -MT CMakeFiles/cmTC_2eb92.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_2eb92.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_2eb92.dir/testCXXCompiler.cxx.o -c /Users/devharsh/Downloads/SEAL-Python/SEAL/build/CMakeFiles/CMakeScratch/TryCompile-p29bdr/testCXXCompiler.cxx     Linking CXX executable cmTC_2eb92     /usr/local/Cellar/cmake/3.26.3/bin/cmake -E cmake_link_script CMakeFiles/cmTC_2eb92.dir/link.txt --verbose=1   ...

[How To] Create A Python Package

Image
Step 1 - Create src and tests folders and add __init__.py. (Optionally, you can add docs and scripts directories and other files like CHANGES.txt and MANiFEST.in ). Step 2 - Add modules with functionalities. Step 3 - Create pyproject.toml and setup.cfg (or setup.py ). Step 4 - Create README.md and LICENSE.txt. Step 5 - Run the following commands: pip install --upgrade pip setuptools wheel tqdm twine build python3 -m build Step 6 - Create an account on TestPyPi and/or PyPi and generate respective API tokens (alternatively, you can use your account username and password). Use  __token__ as username if using API token. Step 7   - for TestPyPi - python3 -m twine upload --repository testpypi dist/* - for PyPi -  python3 -m twine upload dist/* Step 8 - Install and test your package: pip install <your_package_name>