11-10-2022 09:50 AM
Hello!
I'm following the instruction on this page https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Pf1SAE&l=pt-BR to read signals with a NI USB 4432.
I installed the NI DAQmx python API with
$ python -m pip install nidaqmx
If I try it again, it returns:
But if I try, on the Python IDLE SHELL, to import nidaqmx with
>>> import nidaqmx
I receive the this error message:
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import nidaqmx
ModuleNotFoundError: No module named 'nidaqmx'
In Spyder, it works normally, but I need to use it with the Python IDLE.
My Python version is 3.9.2.
Could someone help me? What should I do to NI DAQmx works with Python IDLE?
Thank you!
Solved! Go to Solution.
11-10-2022 10:31 AM
Looks like nidaqmx package was installed in your Anaconda environment and not in your IDLE environment.
Please change your PATH variable to point to the Python IDLE folder instead of anaconda.
11-02-2023 09:50 AM
"Looks like nidaqmx package was installed in your Anaconda environment and not in your IDLE environment."
"Please change your PATH variable to point to the Python IDLE folder instead of anaconda."
Can you tell me how to change the PATH variable as you suggested?
11-02-2023 08:51 PM
@HarryKuang wrote:
"Looks like nidaqmx package was installed in your Anaconda environment and not in your IDLE environment."
"Please change your PATH variable to point to the Python IDLE folder instead of anaconda."
Can you tell me how to change the PATH variable as you suggested?
There are several ways to do that, here is a page that explains the common methods - https://datatofish.com/add-python-to-windows-path/
11-02-2023 09:38 PM
Ok thanks. My Path is already pointing to the IDLE folder though:
For example Path=
C:\Users\harrykuang\AppData\Local\Programs\Python\Python312
My nidaqmx like you said is in:
C:\\ProgramData\\Miniconda3\\lib\\site-packages\\nidaqmx\\__init__.py