LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1761 occurred at Open Python Session after environment variables set

Solved!
Go to solution

I get Error 1761 when I try to open a python session in LabVIEW, before any .py file is opened.

I am using LV 2021, Python 3.9.7.

I have a straightforward python install, not using anaconda or anything.

I have read the other topic on this error and believe I have set-set up my system environment variables.

My python install is at C:\Apps\Python39 and so I have entered this as C:\Apps\Python39\ in the system environment variables under "Path".

I have rebooted and the error remains.

Have I made any mistakes?

 

FYI error 1761 occurs at probe 1 

MrSpanman_1-1647969085697.png

 

snip of path environment variables.

MrSpanman_2-1647969175660.png

tks and regards.

0 Kudos
Message 1 of 4
(2,570 Views)
Solution
Accepted by MrSpanman

In case anyone else gets this issue the initial reason was that when I checked via cmd line, my default python version was 3.9.7 64bit but my LabVIEW is 2021 32bit.

I tried pointing the LabVIEW Open Python Session vi to an older 3.8.x 32bit python install but still got Error 1761.

I installed python 3.10.x 32bit but the cmd line default python version was still 3.9.7 64bit.

I uninstalled all python versions and started again with 3.10.x 32bit, then added python 3.9.x 64bit which I needed for a legacy tool.

PC now sees 3.10.x 32bit as the default and now LabVIEW python integration works.

 

I thought the "Python version" terminal on "Open Python Version.vi" would deal with selecting the version of python to use, maybe it does and my installs were just screwed up I guess.    

0 Kudos
Message 2 of 4
(2,529 Views)

I ran into a similar issue. I believe it may have to do with the order in which the Python versions appear in the PATH variable. The system will use the first one it comes to as it tries to resolve the paths to the executable. Uninstalling and reinstalling probably reordered your Python versions in PATH resulting in the "correct" version being the default (appearing first in the list).

 


@MrSpanman wrote:

I thought the "Python version" terminal on "Open Python Version.vi" would deal with selecting the version of python to use, maybe it does and my installs were just screwed up I guess.    


I agree that LabVIEW should do a better job of choosing the version based on the version string you provide. Otherwise, why would you need to provide it?

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 3 of 4
(2,511 Views)

I had the same problem. I found that there were two files in the wrong way.

 

The two files "niPythonInterface.dll" and "niPythonHost.exe" in the NIPythonInterface folder need to be copied to the labview installation directory (D:Program Files (x86)National InstrumentsLabVIEW 2021)

0 Kudos
Message 4 of 4
(1,904 Views)