Getting Started with the IC Imaging Control 4 Python Library

Installing from PyPI

To install the IC Imaging Control 4 Python Library into your active environment, run:

$ python3 -m pip install imagingcontrol4

It is recommended to use virtual environments to separate different library installations from each other when working on multiple Python projects. For more information on how to create a virtual environment, see Creating a Virtual Environment (packaging.python.org).

Installing from a Local Wheel File

To install the IC Imaging Control 4 Python Library into your active environment using a local .whl file, run the python3 -m pip install command with the whl file as its final parameter, for example:

$ python3 -m pip install imagingcontrol4-1.0.0-py36-none-win_amd64.whl

Make sure to adjust the path, version number and platform tag accordingly.

A Quick Test

To verify the installation was successful, run the interactive Python interpreter:

$ python3

In the interpreter, input the following commands to import and initialize the library, and to query the list of connected video capture devices:

Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr  5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import imagingcontrol4 as ic4
>>> ic4.Library.init()
>>> ic4.DeviceEnum.devices()
[DeviceInfo(model_name='DFK 33GX546', serial='12229933', version='Rev 3013, FPGA GigE3LM-IMX:126')]

If the list of devices comes up empty, make sure that

  • a video capture device is connected to your computer
  • a ic4-compatible driver is installed for the camera