{"id":23012,"library":"zhinst-utils","title":"zhinst-utils","description":"Zurich Instruments utilities for device control, data acquisition, and lab automation. Compatible with Python >=3.7, latest version 0.7.2. Released irregularly.","status":"active","version":"0.7.2","language":"python","source_language":"en","source_url":"https://github.com/zhinst/zhinst-utils","tags":["zurich-instruments","device-control","lab-automation"],"install":[{"cmd":"pip install zhinst-utils","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Core API for Zurich Instruments devices","package":"zhinst-core","optional":false},{"reason":"Numerical processing","package":"numpy","optional":false},{"reason":"Plotting utilities","package":"matplotlib","optional":true}],"imports":[{"note":"Package uses zhinst.utils not zhinst_utils","wrong":"from zhinst_utils import get_zi_device","symbol":"get_zi_device","correct":"from zhinst.utils import get_zi_device"}],"quickstart":{"code":"import os\nfrom zhinst.utils import get_zi_device\n\ndevice_id = os.environ.get('ZI_DEVICE_ID', 'dev1234')\ntry:\n    device = get_zi_device(device_id)\n    print(f\"Connected to {device}\")\nexcept Exception as e:\n    print(f\"Connection failed: {e}\")","lang":"python","description":"Quick connection to a Zurich Instruments device using environment variable for device ID."},"warnings":[{"fix":"Update imports to current API: from zhinst.utils import get_zi_device, etc.","message":"Version 0.5.0 renamed many functions and removed deprecated aliases. Older imports like from zhinst.utils import lockin will fail.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Use `discover_devices()` instead.","message":"The function `zhinst.utils.get_zi_devices()` is deprecated in favor of `zhinst.utils.discover_devices()`.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Run `pip install zhinst-core` or use `pip install zhinst-utils[all]`.","message":"The package does not install zhinst-core automatically; you must install it separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install zhinst-core","cause":"zhinst-core not installed.","error":"ModuleNotFoundError: No module named 'zhinst'"},{"fix":"Upgrade zhinst-utils: pip install --upgrade zhinst-utils","cause":"Using outdated import path or old version (<0.5.0).","error":"AttributeError: module 'zhinst.utils' has no attribute 'get_zi_device'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}