Python

Last modified by Sylvain Berfini on 2026/09/07 09:47

Installation

Python wrapper is currently only available for Linux x86_64 platform, the wheel file can be found on our website.

Once you have downloaded the .whl file, you can install it using pip tool:

pip install linphone-5.5.16-cp312-cp312-linux_x86_64.whl

Test

To test the python wrapper has been correctly installed and is available, here's a very short sample to print the Core version :

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import linphone

print(linphone.Core.get_version())

Documentation

Liblinphone Python API reference is available here, and a tutorials are available there.

Building the wrapper yourself

If you wish to build the python wrapper yourself from your local copy of linphone-sdk, first make sure the following dependencies (in addition of all other required to build the SDK) are installed:

pip install cython wheel pdoc

Then enable the python wrapper build in cmake (you can omit the doc part if you don't want to generate the API documentation):

cmake --preset=default -B build-python -DENABLE_PYTHON_WRAPPER=ON -DENABLE_DOC=ON

Finally build the SDK and then generate the wheel file:

cmake --build build-python --target install
cmake --build build-python --target wheel

Wheel file will then be available inĀ build-python/linphone-sdk/desktop/ folder.