Registry / data / pymeasure

pymeasure

JSON →
library0.16.0pypypi✓ verified 89d ago

PyMeasure is a scientific measurement library for Python that provides instrument communication, experiment management, and live-plotting. As of version 0.15.0 (January 2025), it supports Python >=3.8 and has moved to pyproject.toml. The library is actively maintained with frequent releases featuring new instrument drivers and improvements.

pip install pymeasure
INSTALL
IMPORT
SIG · PYMEASURE
P
pymeasure
datapythonv0.16.0
Install
9.7s avg
Import
846ms
Disk
189MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.16.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.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.874s · 187.7MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 9.7s · import 0.818s · 180MB
189MB installed
● package 189MB
Code
Verified usage

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

Instrument
✓ from pymeasure.instruments import Instrument
✗ from pymeasure import Instrument
Instrument is in the instruments subpackage
ManagedWindow
✓ from pymeasure.display import ManagedWindow
✗ from pymeasure import ManagedWindow
ManagedWindow is in the display subpackage
Procedure
✓ from pymeasure.experiment import Procedure
✗ from pymeasure import Procedure
Procedure is in the experiment subpackage

Quickstart: import PyMeasure, create an instrument, define a procedure, and run it.

import pymeasure from pymeasure.instruments.keithley import Keithley2400 from pymeasure.experiment import Procedure, Results from pymeasure.display import ManagedWindow # Check version print(pymeasure.__version__) # Example: create a Keithley 2400 instrument (simulated if no hardware) try: keithley = Keithley2400("GPIB0::24::INSTR") print(keithley.id) except Exception as e: print(f"Could not connect: {e}") # Define a simple procedure class MyProcedure(Procedure): def execute(self): import time for i in range(5): self.emit('data', {'i': i}) time.sleep(0.1) # Create and run procedure results = Results(MyProcedure(), 'test.csv') print('Procedure created. See framework documentation for full GUI usage.')
Debug
Known issues
deprecatedThe FSL class from `pymeasure.instruments.rohdeschwarz.fsl` is deprecated. Use `pymeasure.instruments.rohdeschwarz.fsseries` instead.
fix
Replace `from pymeasure.instruments.rohdeschwarz.fsl import FSL` with `from pymeasure.instruments.rohdeschwarz.fsseries import FSL`
affects: >=0.15.0
deprecatedAttocube ANC300: `stepu` and `stepd` properties are deprecated.
fix
Use the new `move_raw` method instead.
affects: >=0.13.0
breakingIn version 0.13.0, support for Python 3.7 was dropped. Python 3.8+ required.
fix
Upgrade Python to 3.8 or later. For older Python, use pymeasure<0.13.0.
affects: >=0.13.0
gotchaInstrument initialization often requires a connection string. Using an incorrect string (e.g., missing protocol prefix) can cause cryptic VISA errors.
fix
Use proper connection strings like 'GPIB0::24::INSTR', 'ASRL/dev/ttyUSB0::INSTR', or 'TCPIP0::192.168.1.1::inst0::INSTR'.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pymeasure.instruments'
PyMeasure is not installed or installed incorrectly (e.g., missing subpackage).
fix
Ensure correct installation: `pip install pymeasure` (or `pip install --upgrade pymeasure`). Also check for pip conflicts (e.g., multiple environments).
AttributeError: module 'pymeasure' has no attribute 'instruments'
The top-level pymeasure package does not export subpackages; you must import from the correct subpackage.
fix
Use `from pymeasure.instruments import Instrument` instead of `from pymeasure import instruments`.
VisaIOError: VI_ERROR_TMO (-1073807339) – Timeout expired before operation completed
The instrument did not respond within the default timeout. This often happens with slow instruments or incorrect connection settings.
fix
Increase the timeout: `instrument = Keithley2400("GPIB0::24::INSTR", timeout=5000)` or check the physical connection and address.
Upgrade
Version history
0.16.0latest on PyPI · released May 20, 2026
Audit
Dependencies
pyvisaoptionalRequired for VISA-based instrument communication
pyserialoptionalRequired for serial port communication
numpyrequiredRequired for numeric operations
pandasrequiredRequired for data handling and experiment management
Agent activity
13 hits · last 30 days
node
12
Resources
pymeasure — pip install pymeasure · libregistry