GitHub:
This package is available on GitHub: github.com/labjack/labjack-ljm-python
Installing labjack-ljm
To run LJM using Python, both the LJM library and the labjack-ljm Python package must be installed.
labjack-ljm is typically installed using pip. To use pip, open a terminal or console window and use the following command:
python -m pip install labjack-ljm
or:
pip install labjack-ljm
Run the command with sudo on Linux and Mac.
Alternately, labjack-ljm can be installed via the .zip file. To do so, download/extract the .zip file attached at the top of this page. In a terminal or console, navigate to the extracted folder and run the following command:
python setup.py install
Run the command with sudo on Linux and Mac.
Examples
labjack-ljm examples are in the .zip file attached at the top of this page.
Refer to the download's README.TXT file for requirements, installation, installation troubleshooting, documentation, and license information.
Troubleshooting
Make sure labjack-ljm is installed for the current version of Python
Many computers have multiple installations of Python. The following error indicates that labjack-ljm is not installed for the current version of Python:
ImportError: No module named labjack
Make sure you install labjack-ljm for the Python version you are using. For example, on Linux if both Python 2.7 and 3.5 are installed, you can install labjack-ljm to Python 3.5 with:
$ python3.5 -m pip labjack-ljm install
Check the Python path
To check what the path of the Python executable is:
- Windows - Open cmd and use: where python
- macOS or Linux - Use: which python
You can also check where python3 is, or any other version of Python. For example: where python3 or which python3
Windows - Make sure Python is installed and added to the path
Running python setup.py install may cause the following error:
'python' is not recognized as an internal or external command, operable program or batch file.
In this case, either Python is not installed on your computer or the Python executable was added to the path.
To resolve this, run the Python Windows installer. As shown below, click "Add python.exe to Path" (you may have to scroll down) and select "Will be installed on local hard drive".

Then continue the installation as normal: Go through the above instructions to install labjack-ljm again. To refresh the path, you may need to first open a new terminal or console.
Running Python without adding it to the path
After Python is installed you can run the Python executable from its path without adding it to the path. For example:
C:\Python27\python.exe -m pip labjack-ljm
The above command uses the Python 2.7 path. Make sure you use the correct path for your installation of Python.
Adding Python to the Windows path
Usually Python is added to the user path, as shown above. Another option is to manually add the Python executable path to the Windows path as described in the Python documentation.
5 comments
Is this package available for
Is this package available for a pip install, I have the enthout canopy python distribution and it seems the only way to install external packages is via pip.
It looks like you can install
It looks like you can install the package on this page using pip since it contains a setup.py file for installation.
Try downloading the zip file and running (replace path/to to the directory the file is):
pip install path/to/Python_LJM_2013_12_30.zip
Alternatively, over the network you can try:
pip install http://labjack.com/sites/default/files/2013/12/Python_LJM_2013_12_30.zip
Note that the download's URL and zip file name uses dates, so future releases will have different URL paths and names. Before running either of the above commands, use the current "File attachment" download's URL or zip file name in your "pip install" command.
Can I get a simple Python
Can I get a simple Python example to start with LabJack T7 Pro ?
Are there Python code
Are there Python code examples for the U3?
You'll want to take a look at
You'll want to take a look at the LabJackPython download (it has examples) and the quickstarts:
http://labjack.com/support/labjackpython
The LJM driver/wrapper currently only supports the LabJack T7 and Digit. Older LabJacks such as the U12, UE9, U3 and U6 are supported in LabJackPython.