取消
显示结果 
搜索替代 
您的意思是: 

Python/LabVIEW 32-bit and 64-bit on the same computer?

已解决!
转到解答

I have a couple of projects that need different LabVIEW bitness (32 and 64), and each needs access to python. So I have LabVIEW 32 and 64 installed (2025), and python 32 and 64 installed (3.12.10). How do I tell Open Python Session.vi which version of python to run? I think it is defaulting to whichever version was installed last and is therefore uppermost in the PATH variable, so half the time the incorrect version of python is selected. 

 

Thanks, 

 

David

0 项奖励
1 条消息(共 8 条)
1,100 次查看

The Python path is an environment variable if memory serves, so you'd need to change that before starting. Do you need Python 64 for LV64?

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 项奖励
2 条消息(共 8 条)
1,089 次查看

Yamaeta is correct.

You can not set both Python in the environment variable, choose one.

 

Or you can create two links of both python version with for example names "python_x32.exe", "python_x64.exe", and add the folder path of them into environment variable. In labveiw call the python with the name you added in environment variable.

3 条消息(共 8 条)
1,072 次查看

Or you can create two links of both python version with for example names "python_x32.exe", "python_x64.exe", and add the folder path of them into environment variable. In labveiw call the python with the name you added in environment variable.


That seems like a good idea. I'm not sure what you mean by "link". A shortcut? I'd have to do this from LabVIEW somehow on machines that are running my built application. 

0 项奖励
4 条消息(共 8 条)
1,058 次查看

I'm not sure how to implement the link idea. Open Python Session.vi and Open Venv Python Session.vi take a version number in their Python Version input, like "312" or "310". LabVIEW then seems to use the python version corresponding to the topmost version in the PATH variable. So it seems like I need to edit the path to make the appropriate python version (32 or 64 bit) topmost before invoking it.

0 项奖励
5 条消息(共 8 条)
1,034 次查看
解答
接受人 FlatCat

According to NI (and it seems to be correct), LabVIEW runs the correct version of python automatically. There's nothing explicit that needs to be done by the user. 

6 条消息(共 8 条)
1,010 次查看

@FlatCat wrote:

I'm not sure how to implement the link idea.


I don't know the status quo, but in labview 2020 64 bit the python node will use the version installed in 'C:\program files\python'

 

If you avoid the python node and you use python directly via shell from within labview, you can apply the link idea - link in terms of (absolute) paths to an python.exe

 

 

you can create those python.exe by copying manually the content of the folder in 'C:\program files\python'  (which is easier to use)

or better: download the python.exe from the so-called embedded python (this is harder to use, because of pip)

 

 

 

7 条消息(共 8 条)
988 次查看

Does providing the path to the python binary you want not work? I recall this working for me on Windows with LV2024 but I don't have multiple pythons anymore.

avogadro5_0-1749836895914.png

 

0 项奖励
8 条消息(共 8 条)
932 次查看