Installation¶
Requirements¶
Python 3.7 or newer (including 3.8, 3.9, 3.10, 3.11, 3.12, and 3.13)
NumPy 1.20.0 or newer
A C++ compiler supporting C++14 or newer
Installing from PyPI¶
The easiest way to install py-dem-bones is via pip:
pip install py-dem-bones
This will download and install the pre-built wheel for your platform if available. If no pre-built wheel is available, it will build the package from source, which requires:
A C++ compiler (GCC, Clang, or MSVC)
CMake 3.15 or newer
Eigen 3.3 or newer
Installing from Source¶
We provide a unified installation script for all platforms (Windows, macOS, and Linux):
# On Windows
python install.py
# On macOS/Linux
python3 install.py
Or you can choose a platform-specific installation method:
Platform-Specific Installation¶
Linux/macOS¶
We provide a helper script to simplify the installation process on Linux and macOS:
chmod +x install.sh
./install.sh
Or install manually:
git clone https://github.com/loonghao/py-dem-bones.git
cd py-dem-bones
git submodule update --init --recursive
pip install -e .
Windows¶
Windows installation requires Visual Studio 2019 or 2022 with C++ build tools. We provide a helper script to simplify the installation process:
windows_install.bat
Or install manually after setting up the Visual Studio environment:
# Run in a Visual Studio Developer Command Prompt
git clone https://github.com/loonghao/py-dem-bones.git
cd py-dem-bones
git submodule update --init --recursive
pip install -e .
Development Installation¶
For development, you may want to install additional dependencies:
pip install -e ".[dev,docs]"
This will install development dependencies like pytest, black, ruff, and documentation tools.
Managing Dependencies¶
This project uses Git submodules to manage C++ dependencies:
Dem Bones - The core C++ library for skinning decomposition
Eigen - C++ template library for linear algebra
When cloning the repository, make sure to initialize the submodules:
git clone https://github.com/loonghao/py-dem-bones.git
cd py-dem-bones
git submodule update --init --recursive
Platform-Specific Dependencies¶
Windows¶
On Windows, you need Visual Studio 2019 or 2022 with C++ build tools. Eigen is included as a submodule, but you can also install it using vcpkg:
vcpkg install eigen3:x64-windows
macOS¶
On macOS, you can install Eigen using Homebrew:
brew install eigen
Linux¶
On Ubuntu/Debian, you can install Eigen using apt:
sudo apt-get install libeigen3-dev
On Fedora/RHEL/CentOS, you can install Eigen using dnf/yum:
sudo dnf install eigen3-devel
Verifying Installation¶
You can verify that py-dem-bones is installed correctly by importing it in Python:
import py_dem_bones as pdb
print(pdb.__version__)