PyVISA
Python VISA bindings for GPIB, RS232, TCPIP and USB instruments
What it is and what it does
PyVISA is a Python wrapper around the VISA (Virtual Instrument Software Architecture) standard, which abstracts communication with laboratory instruments across multiple protocols and physical interfaces. Rather than writing protocol-specific code for each instrument type and bus system, developers use PyVISA's unified API to query and control devices connected via GPIB, RS232, Ethernet, or USB. The package acts as a bridge between Python and vendor-supplied VISA libraries (such as NI-VISA), translating high-level Python calls into the appropriate low-level VISA function calls.
The package is designed for scientists, engineers, and test automation developers who need to automate measurement equipment without learning each device's proprietary protocol. It handles the abstraction layer between Python's ease of use and the complexity of instrument communication, making it practical to write portable measurement scripts that work across different hardware setups.
Use it for:
- Automate data acquisition from oscilloscopes, multimeters, and spectrum analyzers in a laboratory environment.
- Build test automation scripts for production line quality assurance that communicate with multiple instruments over different bus types.
- Write portable measurement applications that can work with different vendor instruments by swapping only the VISA library backend.
- Integrate instrument control into data analysis pipelines where Python handles both communication and numerical processing.
- Prototype instrument control logic interactively in Jupyter notebooks before deploying to production test systems.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyVISA provides Python bindings to VISA libraries for controlling measurement instruments and test equipment over GPIB, RS232, Ethernet, and USB interfaces.
Yes. PyVISA is a mature, actively maintained library (Production/Stable since 2008, recent commits, 948 GitHub stars) with minimal dependencies and no known vulnerabilities. It directly solves a real problem—instrument control—for a well-defined audience. Install it if you need to automate laboratory equipment; skip it if you have no instruments to control or use vendor-specific SDKs instead.
Install
pyvisa on PyPI
pip
pip install pyvisauv
uv add pyvisapoetry
poetry add pyvisaInstalling PyVISA
Before you install
Low friction installation with a single lightweight dependency (typing_extensions). The package is actively maintained with recent commits and has been stable since its 2008 inception, now in Production/Stable status.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install pyvisa
import pyvisa
rm = pyvisa.ResourceManager()
instruments = rm.list_resources()
my_instrument = rm.open_resource(instruments[0])
response = my_instrument.query('*IDN?')
my_instrument.close()
Requires a VISA library installed on the system (e.g., NI-VISA or Keysight-VISA); PyVISA is a wrapper that calls these shared libraries.
Verify before relying
- Whether PyVISA-Py (the pure-Python VISA implementation mentioned in the description) is automatically available or requires separate installation.
- Specific VISA library versions known to work reliably with PyVISA 1.16.2 beyond the tested NI-VISA 17.5 and Keysight-VISA mentioned.
Package facts
| License | The MIT License Copyright (c) 2005-2024 PyVISA Authors and contributors. See AUTHORS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing_extensions |
| Maintenance | actively maintained — 168 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,132,178/month — #4,315 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyvisa-1.16.2-py3-none-any.whl
Keywords: VISA, GPIB, USB, serial, RS232, measurement, acquisition
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
MultiPyVuMultiPyVu provides Python control over Quantum…
permissive · top 15,000 on PyPI
PyVISA-pyPyVISA-py is a pure Python backend for the VISA…
permissive · top 5,000 on PyPI
RsInstrumentRsInstrument provides a Python interface for…
permissive · top 15,000 on PyPI
PyVISA-simPyVISA-sim provides a simulated VISA backend…
permissive · top 15,000 on PyPI
zhinst-toolkitzhinst-toolkit provides a high-level Python…
permissive · top 15,000 on PyPI
pyghmiPyghmi provides Python bindings for IPMI…
permissive · top 15,000 on PyPI
zhinst-corezhinst-core provides a native Python API for…
permissive · top 15,000 on PyPI
pyftdiPyFtdi provides a pure-Python user-space driver…
permissive · top 15,000 on PyPI
tdl-xoa-driverProvides a Python interface to control and…
permissive · top 15,000 on PyPI
brainstemProvides Python bindings to control and…
unclear · top 15,000 on PyPI