How to install Pypylon for Python

How to install Pypylon for Python
How to install Pypylon for Python

Why use pypylon? And why should you use it for Python?

Well, Python is a dynamic, object-oriented programming language with many uses. Pypylon is a wrapper interface that connects with the powerful Basler pylon Camera Software Suite that permits both new and experienced Python software engineers to effectively develop applications without thinking about setting up a development environment.

This accelerates the camera assessment process, expands the software engineer’s efficiency, and diminishes the all-out project costs.

How to install?

  1. Start by installing pylon
  2. Install pyplon with the following command:
pip3 install pypylon

After installation, you can use the following code to test the camera:


from pypylon import pylon

camera = pylon.InstantCamera(pylon.TlFactory.GetInstance().CreateFirstDevice())

# demonstrate some feature access
new_width = camera.Width.GetValue() - camera.Width.GetInc()
if new_width >= camera.Width.GetMin():

numberOfImagesToGrab = 100

while camera.IsGrabbing():
    grabResult = camera.RetrieveResult(5000, pylon.TimeoutHandling_ThrowException)

    if grabResult.GrabSucceeded():
        # Access the image data.
        print("SizeX: ", grabResult.Width)
        print("SizeY: ", grabResult.Height)
        img = grabResult.Array
        print("Gray value of first pixel: ", img[0, 0])


Video on the way!