Registry / pypylon

pypylon

JSON →
library26.5.0pypypi✓ verified 87d ago

The official Python wrapper for the Basler pylon Camera Software Suite, enabling control of Basler cameras via Python. Current version is 26.3.1, released around April 2026. The library follows Basler's pylon release cadence, with major version bumps aligning with pylon SDK updates.

pip install pypylon
INSTALL
IMPORT
SIG · PYPYLON
P
pypylon
pythonv26.5.0
Install
3.5s avg
Import
52ms
Disk
251MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v26.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.5s · import 0.052s · 253MB
251MB installed
● package 251MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

InstantCamera
from pypylon import pylon
import pypylon
pypylon is a namespace package; cameras are accessed via pylon module.
PylonImage
from pypylon import pylon
from pypylon.pylon import PylonImage
Direct import from pypylon.pylon may break; use pylon.PylonImage.

Basic camera enumeration, opening, grabbing one image, and closing.

from pypylon import pylon # Enumerate cameras devices = pylon.TlFactory.GetInstance().EnumerateDevices() camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice()) camera.Open() print("Camera model:", camera.GetDeviceInfo().GetModelName()) camera.StartGrabbing(1) grab = camera.RetrieveResult(5000) if grab.GrabSucceeded(): img = grab.Array print("Image shape:", img.shape) camera.Close()
Debug
Known issues
breakingpypylon 26.x drops support for Python 3.8 and older; requires pylon SDK 6.x or later. Older 4.x versions are incompatible with newer pylon SDKs.
fix
Use pypylon 26.x with pylon SDK >=6.3. Check Basler's compatibility matrix.
affects: <=4.2.0 vs >=26.0.0
breakingThe pypylon package name changed from 'pypylon' to 'pypylon' but the import module is 'pylon' (not 'pypylon'). Common mistake: 'import pypylon' fails because pypylon is a namespace package without a top-level module.
fix
Always use 'from pypylon import pylon' or 'import pypylon.pylon as pylon'.
affects: All
gotchaOn Linux, the pylon SDK must be installed separately (via Basler's website) because pypylon depends on system-wide pylon libraries. pip install does not include them.
fix
Download and install the pylon SDK for Linux from Basler's support site before pip installing pypylon.
affects: All
gotchaPylonImage objects returned by RetrieveResult() must be released to avoid memory leaks. Use 'with' context manager or call Release() manually.
fix
Use: with camera.RetrieveResult(5000) as grab: ...
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pypylon'
pypylon not installed or installed in wrong environment.
fix
Run: pip install pypylon
pypylon.pylon.PylonException: The pylon transport layer is not available. (Timeout)
pylon SDK not properly installed or camera not connected.
fix
Ensure pylon SDK is installed (check with 'pylon-config --version' on Linux) and camera is connected via USB/GigE.
ImportError: libpylonbase-6.3.so: cannot open shared object file: No such file or directory
Missing pylon SDK system libraries on Linux.
fix
Install the pylon SDK from Basler, then set LD_LIBRARY_PATH to the pylon lib directory, e.g., export LD_LIBRARY_PATH=/opt/pylon/lib64:$LD_LIBRARY_PATH
Upgrade
Version history
26.5.0latest on PyPI · released May 26, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
9
OpenAI (training)
1
Resources
pypylon — pip install pypylon · libregistry