LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabPython doesnt work because dll is not compatible

I have downloaded LabPython from OpenG and is not working. When I give it the lvpython.dll, it is showing a error : The library selected is not valid for current platform. For eg : you are running a 64 bit LabVIEW and the library might be 32 bit. 

This is the error. 

pythonLibraryProblem.jpg

How do I solve this. Thank you. 

0 Kudos
Message 1 of 10
(1,413 Views)

So what do you expect us to do ?

 

What LabVIEW version do you use?

What bit version is LabVIEW ? 32 or 64?

What version of Python do you use ? 

 

You do know that this tool is very old. 

0 Kudos
Message 2 of 10
(1,395 Views)

pythonVersion.jpg

 I use LabVIEW 2016 which is 64 bit and python you can see in the screenshot. This is the only tool I found in VIPM.  

0 Kudos
Message 3 of 10
(1,382 Views)

And if you did some search on google you will find this post: 
https://forums.ni.com/t5/LabVIEW/Trouble-with-LabPython-Setting-up-the-Python-Server/td-p/1444082

 

LabPython is for 32 bit only. 
The confirmed support for python is version 2.7.5. 

 

I does not work with LabVIEW 64-bit and not with Python 64-bit. 

0 Kudos
Message 4 of 10
(1,374 Views)

It says recompile the LabPython DLL source code as 64 Bit DLL.  I dont have the source code with me. Is this the only way?

0 Kudos
Message 5 of 10
(1,363 Views)

Might be, but as the tool is +10 years old there could be many things that has changed. 

Your Python version 3.x.x might not have the same interface as version 2.7. 

LabVIEW 64bit in version 2016  might not have needed functions that was in LabVIEW 2009 32 bit. 

You are running python in a Anaconda virtual environment, LabPython might not be able to function with that.  

 

You do know that LabVIEW has support for calling python in version 2018 and newer. 

But only in LabVIEW 2023 is supported for virtual environments as your Anaconda.  

https://www.ni.com/en/support/documentation/supplemental/18/installing-python-for-calling-python-cod...

0 Kudos
Message 6 of 10
(1,357 Views)

The tool is 20 years old actually. Back then it was a fancy trial to see if I could integrate Python into LabVIEW. Most people on this planet thought Python was a fancy but meaningless programming language. Interest to use it was equally low so I lost interest too. I never looked back and considering that recent LabVIEW versions have actually a Python node, any extra effort on LabPython seems moot.

 

LabPython as is definitely will not work out of the box with Python 3.0 and higher. The embedding API has changed enough that a simple recompile will not work. The C code for the intermediate DLL needs some modifications. It also has no provisions for Virtual Environments. Back then nobody even knew what that could be.

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 10
(1,251 Views)

Just use the built in Python nodes?

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 10
(1,226 Views)

I dont have built in python nodes. I use LabVIEW 2016

0 Kudos
Message 9 of 10
(1,195 Views)

Enthought offered the Python Integration Toolkit, though I believe it is discontinued now.

 

It is still listed on the tools network, might be worth a try: https://www.ni.com/en/support/downloads/tools-network/download.python-integration-toolkit-for-labview.html 

 

It also shows up on VIPM: https://www.vipm.io/search/?q=python&ide_version=16&ide_bitness=&os=

0 Kudos
Message 10 of 10
(1,175 Views)