A demo of the NI DAQmx Python library.
- Install python on your system, if it isn't already installed
- I prefer to install it from a standalone installer rather than the install manager
- For this demo, version 3.10 or newer will work just fine
- When I install, I pick several nonstandard options from the "Customize Installation" menu
- I do not add python.exe to
PATH(I like to explicitly call the version I want to use) - I do not install the
pylauncher, for the same reason - I do install for all users
- I put every version in
C:\pythons, for example,C:\pythons\python3_10\,C:\pythons\python3_12\, etc.
- I do not add python.exe to
- No matter how you choose to install, find the path to the python interpreter (
python.exe) that got installed
- Next, create a virtual environment
- The concept is out of scope for this blog, but if you're a beginner, just take my word for it
- In PowerShell, run
C:\pythons\python3_10\python.exe -m venv venv - Replace the path to
python.exewith the path you used
- Activate the virtual environment:
.\venv\Scripts\activate - Install the required packages from pypi:
(venv) PS> pip install -r requirements.txt
Inside your activated virtual environment, simply run python demo.py.