Installing the Driver Module¶
- Prerequisites
The keysight_kt34400 driver Python module requires the following prerequisites:
Operating System
Windows - Windows 7 SP1, Windows 8.1, Windows 10 (32 or 64-bit)
- Linux (64-bit)
CentOS 7.1, 7.2, 7.3, 7.4, 7.5, 7.6
Red Hat 7.1,7.2, 7.3, 7.4, 7.5, 7.6
Ubuntu 16.04, 18.04
Note: Newer Linux versions may be used but may not support connecting via USBTMC or USB-to-GPIB converter per Keysight IO Libraries Suite kernel driver availability.
Python 3.6 or newer
-
Windows - Python for Windows installer comes in 32-bit (x86) or 64-bit (x86-64) versions.
Note: When installing Python, enable the "Add Python
to PATH" option which is NOT checked by default. Multiple versions of Python can be installed. If multiple versions are installed, whichever one is listed first in your system Path environment variable will be used by the driver. -
Linux - Almost all Linux distributions come with Python installed.
To check, open a terminal and enter:
python3 --versionIf not found or version < 3.6 install per your Linux distribution. Also required: pip3 - Check with:pip3 --versionpython3-devel (CentOs) - Check with:yum list installed python3*devel*python3.6-dev (RH/Ubuntu) - Check with:apt list --installed | grep python3.6-dev
C++ Compiler
A C++ compiler is required to build and install the driver Python module. If needed, install one of the following:- Windows - MSVC compiler. Install Visual Studio (any edition) with "Desktop development with C++" workload selected OR if full VS ADE not needed, Build Tools for Visual Studio (command line interface) with "C++ build tools" workload selected.
- Linux - GCC 9, the GNU compiler collection. Almost all Linux distributions come with GCC installed.
To check, open a terminal and enter:
gcc --versionIf not found or version < 9.0 install per your Linux distribution.
CMake 3.16 or newer
CMake tools are used to build and install the driver Python module. If needed, install the latest stable binary distribution for Windows or Linux from CMake.org. To check, from a Windows command prompt or Linux terminal, enter:cmake --versionVISA
The driver module uses VISA to communicate with the instrument. Any compliant implementation is acceptable. The latest version of Keysight IO Libraries Suite is recommended, includes VISA, and supports Windows or Linux.
Installing the Driver Module Package
The Python module source archive, keysight_kt34400-2.1.2.tar.gz, is available in the same folder as this HTML Help archive. Package Installer for Python (pip), which is included with Python, uses this file to build and install the driver module for the OS and Python version in use on your machine in a single operation.
To build and install the keysight_kt34400 module execute the following command, from a Windows command prompt or Linux terminal in the same folder as the module source archive file:
pip install keysight_kt34400-2.1.2.tar.gz
- Note:
On Linux use:
pip3pip only installs the module for the currently in use version of Python (first in your env Path). If you install a new version of Python or edit your Path order, you must run pip again (from a new command prompt) to install the module for the new, in use version of Python.
Installing on Multiple Systems
Optionally, you can create a binary ‘wheel’ file distribution from the source module archive that can be easily installed on multiple machines. The additional machines do not need the C++ compiler or CMake requirements to install the pre-built binary wheel file distribution. Other than Python and pip, the only requirement is that the target machines must use the same operating system and version of Python as the machine used to create the wheel file.
- To create a wheel file in the current directory use:
pip wheel --no-deps keysight_kt34400-2.1.2.tar.gz- To install the new wheel file use:
pip install keysight_kt34400-2.1.2-cp<ver>-cp<ver>-<OS>.whl
Uninstalling the Driver Module Package
- To uninstall the driver module use the ‘uninstall’ option with the module name as in:
pip uninstall keysight_kt34400
Viewing Installed Module Information
- To view a list of all installed modules use the ‘list’ option as in:
pip list- To view detailed module information use the ‘show’ option with the module name as in:
pip show keysight_kt34400
