Repository navigation
Build
- cmake (>= 3.26)
- gcc / msvc (C++17)
- Python >= 3.11 (with the Development component)
- Windows: keep the default options when installing Python (development files ship with the installer)
- Linux: e.g. on Debian
sudo apt install python3-dev
- OpenGL environment
- Windows: usually no configuration needed
- Linux: install the corresponding dev dependencies, e.g. on Debian
sudo apt install libgl1-mesa-dev libglu1-mesa-dev
The Cubism Core and Framework are included in this repository (the Live2D/ directory) — no separate download needed.
git clone --recursive git@github.com:EasyLive2D/live2d-py.git(--recursive pulls the submodules; they are only needed for running tests, not for building the Python library)
cmake -S . -B build -G "Visual Studio 18 2026" -T host=x64 -A x64
cmake --build build --config Release --target Live2DWrapper -j 24When using another Visual Studio version, replace
Visual Studio 18 2026with the matching generator (e.g.Visual Studio 17 2022).
The build output _live2d.pyd is automatically copied to package/live2d/; use that directory as the Python module.
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --target Live2DWrapper -j- Install Visual Studio Code and Visual Studio (check the "Desktop development with C++" workload)
- Open this repository with Visual Studio Code
code live2d-py
- Install the VS Code extensions:
C/C++,CMake,CMake Tools - Press
Ctrl + Shift + Pto open the command palette and selectCMake: Configure(pick your Visual Studio as the Kit,Releaseas the Variant, and thex64architecture) - In the CMake view (bottom status bar), select the
Live2DWrapperbuild target and clickbuild - When finished, the output file is
package/live2d/_live2d.pyd
Python is located in the following order during the build (3.11+ with the Development component required):
- Environment variable
PYTHON_INSTALLATION_PATH(explicit Python installation directory, highest priority) - Windows registry (standard python.org installation)
- Python found on
PATH
To pin a specific Python version:
set PYTHON_INSTALLATION_PATH=D:/Python312 # Windows
export PYTHON_INSTALLATION_PATH=/usr/local # Linux# Enable internal v2cpp debug output (Debug.hpp, fprintf to stderr)
cmake -DV2CPP_DEBUG=ON -S . -B buildCubism 2.1 models are implemented as a C++ port (v2cpp), already merged into the unified live2d.Model and built together with the Live2DWrapper target — no extra steps required.
The pure-Python live2d.v2 is deprecated (no build needed, but slower; use live2d.Model instead).