Unable to Locate NIDAQmx.h Using PyDAQmx and Cygwin

Updated Jan 25, 2023

Reported In

Driver

  • NI-DAQmx

Issue Details

I am receiving a
  NotImplementedError: Location of niDAQmx library and include file unknown on cygwin
error when using PyDAQmx to call the DAQmx library. Why is PyDAQmx unable to locate my DAQmx.h file from a Cygwin environment?

Solution

Cygwin and PyDAQmx are not officially supported by National Instruments. Because Cygwin introduces a Linux-like environment on a Windows operating system, we cannot predict how third-party packages will interact with National Instruments files. Please follow the suggestions below for initial troubleshooting steps: 
  1. Confirm the NIDAQmx.h file is located on your machine. The default location is 
       C:\Program Files (x86)\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
       
       If the file is missing on your computer, there might be an issue with the NI DAQmx installation and you should repair the driver
  2. Confirm you have installed support for ANSI C with the NI DAQmx installation. 
  3. Confirm you are able to run your program on a Windows OS. Build your application into a DLL and then call it in the Cygwin environment. 

    Additional Information

    If you are still experiencing issues, please refer to the following for additional support. 
    1. Consult Cygwin and PyDAQmx documentation and community forums
    2. Consider using the NI-DAQmx python API. This software package runs on Windows platforms only and is officially supported by National Instruments.