cppyy-cling
raw JSON → 6.32.8 verified Fri May 01 auth: no python
Re-packaged Cling C++ interpreter, used as the JIT backend for cppyy. Provides the C++ runtime and interpreter for cppyy's automatic Python-C++ bindings. Version 6.32.8, released on 2025-05-26. Release cadence follows cppyy releases.
pip install cppyy-cling Common errors
error ModuleNotFoundError: No module named 'cppyy_backend' ↓
cause Attempting to import cppyy_backend instead of cppyy, or missing cppyy-cling installation.
fix
Install cppyy-cling: pip install cppyy-cling. Then use 'import cppyy'.
error RuntimeError: cppyy backend not found. Please install cppyy-cling or set CPYY_BACKEND ↓
cause cppyy-cling not installed or not found by cppyy.
fix
Run: pip install cppyy-cling. Ensure it's installed in the same Python environment.
error ImportError: cannot import name 'gbl' from 'cppyy' ↓
cause Using 'from cppyy import gbl' incorrectly; correct is 'from cppyy import gbl' (if you write import cppyy.gbl it's wrong). But if you do from cppyy import gbl it works.
fix
Use either 'from cppyy import gbl' or 'import cppyy; gbl = cppyy.gbl'.
Warnings
gotcha cppyy-cling is a separate package from cppyy. You must install cppyy-cling explicitly (or let cppyy install it as a dependency). If only cppyy is installed, the backend may be missing. ↓
fix pip install cppyy-cling
gotcha Do not import cppyy_backend or cppyy_cling directly. The correct way to use the backend is through cppyy. cppyy auto-detects cppyy-cling. ↓
fix Use 'import cppyy' and then use cppyy functions.
breaking In cppyy-cling 6.32.x, the default C++ standard may be C++17. Code relying on C++11 or C++14 features might behave differently. Explicitly set standard with cppyy.add_include_path or cling flags. ↓
fix Use cppyy.cppdef('...') or pass -std=c++14 to cppyy.add_include_path via cppyy.load_library.
Imports
- cppyy wrong
import cppyy_backendcorrectimport cppyy - cppyy.gbl wrong
import cppyy.gblcorrectfrom cppyy import gbl
Quickstart
import cppyy
cppyy.include('iostream')
cppyy.gbl.std.cout << 'Hello from C++ via cppyy' << cppyy.gbl.std.endl