{"id":24324,"library":"pyepics","title":"pyepics","description":"A Python interface to the Epics Channel Access protocol, providing client-side access to EPICS process variables (PVs). Current version 3.5.9, supports Python >=3.10. Released roughly every few months.","status":"active","version":"3.5.9","language":"python","source_language":"en","source_url":"https://github.com/pyepics/pyepics","tags":["epics","channel-access","pv","control-system"],"install":[{"cmd":"pip install pyepics","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"The top-level package is 'epics', not 'pyepics'. 'pyepics' is the distribution name.","wrong":"from pyepics import PV","symbol":"PV","correct":"from epics import PV"},{"note":"caget is exposed at the epics level, though available in epics.ca. Use epics.caget for brevity.","wrong":"from epics.ca import caget","symbol":"caget","correct":"from epics import caget"},{"note":"caput is a function in the epics module, not a standalone package.","wrong":"import caput","symbol":"caput","correct":"from epics import caput"}],"quickstart":{"code":"from epics import PV, caget, caput\n\n# Connect to a PV\npv = PV('my_pv_name')\nprint('Connected:', pv.connect())\n\n# Get value\nvalue = pv.get()  # or caget('my_pv_name')\nprint('Value:', value)\n\n# Put value\ncaput('my_pv_name', 42.0)  # or pv.put(42.0)\n\n# Monitor callback\ndef callback(pvname, value, **kw):\n    print(f'{pvname} = {value}')\npv.add_callback(callback)\n","lang":"python","description":"Basic usage: create a PV, get/put values, and monitor changes."},"warnings":[{"fix":"Use 'from epics import PV' instead of 'from pyepics import PV'.","message":"The top-level package is 'epics', not 'pyepics'. Always import from 'epics'.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade Python to 3.10 or later. Use pyepics <3.5.9 if stuck on Python 3.9.","message":"Python 3.9 support dropped in version 3.5.9. Python >=3.10 required.","severity":"breaking","affected_versions":">=3.5.9"},{"fix":"Use threading locks or queue data to main thread.","message":"Callbacks are invoked in a separate thread. Ensure thread safety when modifying shared state.","severity":"gotcha","affected_versions":"all"},{"fix":"Avoid wxlib if possible, or prepare to migrate to alternative GUI libraries.","message":"The wxlib module is outdated and uses deprecated wxPython APIs. It may break in future releases.","severity":"deprecated","affected_versions":">=3.5.9"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from epics import PV' (the distribution is 'pyepics', but the package is 'epics').","cause":"Trying to import 'pyepics' directly. The correct import is 'epics'.","error":"ModuleNotFoundError: No module named 'pyepics'"},{"fix":"Run 'from epics import PV' explicitly.","cause":"Incomplete import. 'epics.PV' is available only after importing from epics.","error":"AttributeError: module 'epics' has no attribute 'PV'"},{"fix":"Verify the PV name and ensure the EPICS server is reachable (e.g., with caget from the command line).","cause":"EPICS Channel Access server not running or PV name incorrect.","error":"ConnectionRefusedError: No Connection: ..."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}