09-21-2023 06:26 AM
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.
How do I solve this. Thank you.
09-21-2023 07:17 AM
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.
09-21-2023 07:29 AM
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.
09-21-2023 07:37 AM
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.
09-21-2023 07:52 AM
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?
09-21-2023 08:06 AM - edited 09-21-2023 08:08 AM
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.
09-26-2023 03:25 AM - edited 09-26-2023 03:31 AM
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.
09-26-2023 10:36 AM
Just use the built in Python nodes?
09-28-2023 04:18 AM
I dont have built in python nodes. I use LabVIEW 2016
09-28-2023
08:48 AM
- last edited on
03-12-2024
08:01 PM
by
Content Cleaner
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=