Check Python installation and Moku packages
-
Moku:Go
Moku:Go Arbitrary Waveform Generator Moku:Go Data Logger Moku:Go Frequency Response Analyzer Moku:Go Logic Analyzer & Pattern Generator Moku:Go Oscilloscope & Voltmeter Moku:Go PID Controller Moku:Go Spectrum Analyzer Moku:Go Waveform Generator Moku:Go Power Supplies Moku:Go Digital Filter Box Moku:Go FIR Filter Builder Moku:Go Lock-in Amplifier Moku:Go General Moku:Go Logic Analyzer/Pattern Generator Moku:Go Time & Frequency Analyzer Moku:Go Laser Lock Box Moku:Go Phasemeter
-
Moku:Lab
Moku:Lab General Moku:Lab Arbitrary Waveform Generator Moku:Lab Data Logger Moku:Lab Digital Filter Box Moku:Lab FIR Filter Builder Moku:Lab Frequency Response Analyzer Moku:Lab Laser Lock Box Moku:Lab Lock-in Amplifier Moku:Lab Oscilloscope Moku:Lab Phasemeter Moku:Lab PID Controller Moku:Lab Spectrum Analyzer Moku:Lab Waveform Generator Moku:Lab Time & Frequency Analyzer Moku:Lab Logic Analyzer/Pattern Generator
-
Moku:Pro
Moku:Pro Arbitrary Waveform Generator Moku:Pro Data Logger Moku:Pro Frequency Response Analyzer Moku:Pro Oscilloscope Moku:Pro PID Controller Moku:Pro Spectrum Analyzer Moku:Pro Waveform Generator Moku:Pro Lock-in Amplifier Moku:Pro Digital Filter Box Moku:Pro FIR Filter Builder Moku:Pro Phasemeter Moku:Pro Multi-instrument Mode Moku:Pro General Moku:Pro Logic Analyzer/Pattern Generator Moku:Pro Time & Frequency Analyzer
- Python API
- MATLAB API
- Arbitrary Waveform Generator
- Data Logger
- Digital Filter Box
- FIR Filter Builder
- Frequency Response Analyzer
- Laser Lock Box
- Lock-in Amplifier
- Oscilloscope
- Phasemeter
- PID Controller
- Spectrum Analyzer
- Time & Frequency Analyzer
- Waveform Generator
- Logic Analyzer & Pattern Generator
- Multi Instrument Mode
- Moku Cloud Compile
- Moku general
- LabVIEW
If you are contacting support about issues with the Python Moku API, please copy this script and run it from where you usually run your python scripts, whether that is a Command Prompt, Terminal, Visual Studio, Spyder, Jupyter Notebook, Anaconda etc.
import os
import subprocess
import sys
import re
print("\n")
python_path = sys.executable
python_ver = subprocess.check_output([python_path, "--version"])
python_ver = re.search(r"(\d+\.)+\d+", str(python_ver))[0]
moku_link = "https://apis.liquidinstruments.com/starting-python.html"
fw_link = "https://apis.liquidinstruments.com/download-bitstreams.html"
cli_link = "https://liquidinstruments.com/software/utilities/"
try:
from moku import __version__
except ImportError as e:
if str(e) == "No module named 'moku'" or str(e) == "No module named moku":
print("%s\nPLEASE RUN `pip install moku`" % e)
moku_ver = "Moku module not found `pip install moku` %s" % moku_link
elif (str(e) == "No module named 'pkg_resources'" or
str(e) == "No module named pkg_resources"):
print("%s\nPLEASE RUN `pip install setuptools`" % e)
moku_ver = "pkg_resources module not found `pip install setuptools`"
elif str(e).startswith("cannot import name '__version__' from 'moku'"):
try:
pip_moku = subprocess.check_output([python_path, "-m",
"pip", "show", "moku"])
moku_ver = re.search(r"(\d+\.)+\d+", str(pip_moku))[0]
except Exception as e:
print(e)
moku_ver = "Unknown error"
else:
print(e)
moku_ver = "Unknown error"
else:
moku_ver = __version__
moku_ver = re.search(r"(\d+\.)+\d+", str(moku_ver))[0]
try:
from moku import MOKU_DATA_PATH
except ImportError as e:
if str(e) == "No module named 'moku'" or str(e) == "No module named moku":
print("%s\nPLEASE RUN `pip install moku`" % e)
moku_path = "Moku module not found"
moku_fw = "Moku module not found"
elif (str(e) == "No module named 'pkg_resources'" or
str(e) == "No module named pkg_resources"):
print("%s\nPLEASE RUN `pip install setuptools`" % e)
moku_path = "pkg_resources module not found"
moku_fw = "pkg_resources module not found"
else:
print(e)
moku_path = "Unknown error"
moku_fw = "Unknown error"
else:
moku_path = MOKU_DATA_PATH
try:
moku_fw = os.listdir(MOKU_DATA_PATH)
except FileNotFoundError as e:
print("moku data error: %s\nPLEASE RUN `moku download`" % e)
moku_fw = "Data files not downloaded `moku download` %s" % fw_link
try:
from moku import MOKU_CLI_PATH
except ImportError as e:
if str(e) == "No module named 'moku'" or str(e) == "No module named moku":
cli_path = "Moku module not found"
cli_ver = "Moku module not found `pip install moku` %s" % moku_link
elif (str(e) == "No module named 'pkg_resources'" or
str(e) == "No module named pkg_resources"):
cli_path = "pkg_resources module not found"
cli_ver = "pkg_resources module not found `pip install setuptools`"
else:
print(e)
cli_path = "Unknown error"
cli_ver = "Unknown error"
else:
cli_path = MOKU_CLI_PATH
try:
cli_ver = subprocess.check_output([MOKU_CLI_PATH, "--version"])
cli_ver = re.search(r"(\d+\.)+\d+", str(cli_ver))[0]
except Exception as e:
print("mokucli error: %s\nPLEASE INSTALL MOKUCLI %s" % (e, cli_link))
cli_ver = "Couldn't call mokucli, install from %s" % cli_link
print("\n")
print("PYTHON PATH: %s" % python_path)
print("PYTHON VERSION: %s" % python_ver)
print("MOKUCLI PATH: %s" % cli_path)
print("MOKUCLI VERSION:%s" % cli_ver)
print("MOKU DATA PATH: %s" % moku_path)
print("MOKU VERSION: %s" % moku_ver)
print("MOKU DATA FW: %s" % moku_fw)
This will output some text that you can copy and send back to our Support Engineers, it will look something like this:
PYTHON PATH: c:\Users\user\AppData\Local\Programs\Python\Python312\python.exe
PYTHON VERSION: 3.12.3
MOKUCLI PATH: C:\Program Files\Liquid Instruments\Moku CLI\mokucli.EXE
MOKUCLI VERSION:2.3.0
MOKU DATA PATH: c:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\moku\data
MOKU VERSION: 3.3.3
MOKU DATA FW: ['mokudata-601.tar']