11-02-2018 06:04 AM
Hey payto,
I've found this discussion: https://forums.ni.com/t5/LabVIEW/Python-Node-in-LV2018/td-p/3797256/page/2
They too are using Anaconda and...
After a long time of research, I found the solution :
1. in the command prompt write "cd C:\Users\user\AppData\Python36-32\Scripts" so all the other command will occur in this folder.
2. type "pip install numpy" and the other libraries that you want. I installed matplotlib, scipy, scikit-learn, pillow, pandas, tensorflow (compatible just with Python 64bits) and keras.
I'd check out the thread... they're some other advice on how to use this, supported data types etc.
Cheers, Rebecca
01-13-2019 10:11 AM
Hello,
I don' t understand how to run python on labview. I use anaconda and if I understand it I must install the "normal " python 3.6 ? Is there a way with a detailed explanation of how to proceed ?
Nicolas
01-14-2019 01:10 AM
personally I gave up the Anaconda idea and I simply used the standard python 3.6
01-28-2019 03:20 PM
Yes but how install packages in python 3.6 ? It's easy in jupyter consol but it seem to be more difficult when you have python 3.6 and jupyter. Have you an idea how can I change the path for installing my packages in the python 3.6 ? I had already use the "cd C:\Users\user\AppData\Python36-32\Scripts" to change instalation folder but when I use pip install numpy this command dont runs because pip is don't recognise.
Sorry for my english !
Nicolas
02-06-2019 10:44 AM
Hi Cassanati,
You seem to suggest you got the python node with python 3.6 working with Labview 2018 32bits? Is that right?
Was that simply by not using a conda environment and installing packages manually? Were there any other "tricks" or system changes you did?
Thanks a lot
02-07-2019 01:10 AM
No other tricks. Just use the installer from python.org and remember to install the python 32 bit if you use labview 32 bit or the python 64 bit if you use the labview 64bit.
12-03-2019 08:40 PM
There are many opportunities for failure in getting LabVIEW to talk to Python and very few paths to success. Keep in mind that common installations such as Visual Studio Python will not provide a path to success using the default installation. Pick the wrong installer off of Python.org = fail. Choose the default installer options off of Python.org's 32-bit Python 3.6.x installer = fail. I have included one path to success in the attached PDF. I hope it is helpful. If you have a different path to success please share.
04-22-2020 06:15 PM
Thanks for the detailed notes. Before using your .pdf, I tried for the better part of today to get LabVIEW 2019 64 bit and LabVIEW 2018 32-bit to work with my 64-bit or 32-bit Anaconda python distribution. I couldn't get past this error in either case:
Error 1671 occurred at Open Python Session in python test.vi
Possible reason(s):
LabVIEW: (Hex 0x687) There was an error in executing the specified function. Python returned the following error: Error creating host process
Environment variable path was set up to include my python folder. I even tried having LabVIEW use a call library node to python3.dll. It would properly find the .dll (using environment path) and could run a few functions (like Py_GetVersion). Running Py_Initialize on the .dll would cause LabVIEW to crash without even a dialog--maybe that's a clue. Unfortunately, I never could get the Open Python Session node to succeed with the python located in my anaconda distribution.
But once I followed EZ-TechStop's .pdf instructions, it worked! I suspect that the detailed instructions are more than you need. Based on other posts in this thread, I expect the following is enough:
1) use the python windows distribution (not anaconda)
2) ensure the path environment variable is set up properly, either via the installer as EZ-TechStop indicated in the .pdf, or as indicated in the NI instructions here.
Losing the ability to call into a specific conda environment is a bummer. The code I'm using is shared among my coworkers using conda. I guess I'll need to set up and maintain entirely new Python distribution just for LabVIEW to call into. Fingers crossed this will work. Even if it does, keeping two distributions of my code healthy will be extra work. If anyone was successful at getting LabVIEW to work with an anaconda distribution, please share.
So far I'm able to use python 3.7 with LabVIEW 2018 32-bit just fine. I'm just getting started, however.
10-10-2020 12:47 AM
I have a deep neural network code in jupyter notebook with a virtual anaconda environment using keras with tensorflow. The program takes a large 1D array(say 10^6 samples) as input and outputs a modified data of the same size. Now, I have to pass the data from a labview project that i have done, to this program and the output from this program is again fed into labview which will be transmitted via usrp. How can i interface the jupyter code and labview? Is it possible? Please do respond.
12-04-2023 05:14 AM
The thread is old, but I'm trying to understand how LV (in my case 2020SP1) activates the Python interpreter? My idea was to create a junction c:\python3.6 as hardlink to conda python3.6_32bit environment.
mklink /j c:\python3.6 c:\users\me\anaconda3\envs\py3.6_32bit
I added c:\python3.6 to PATH variable for both system and current user account and set windows to open *.py files with python3.6.exe. But still I get the error 1671 "error creating host process".
If I follow the instructions from @EZ_TechStop, everything works fine. My question: what does Windows Installer do more, that I forgot to do manually?