04-19-2021 09:34 PM
LabVIEW 2021 adds support for Python 3.7, 3.8, and 3.9. It maintains support for Python 3.6 but deprecates support for Python 2.7.
The Open Python Session function now takes an optional parameter for the path to the Python executable:
04-27-2021 10:35 AM - edited 04-27-2021 10:37 AM
Have there been any other improvements to the Python interface from LabVIEW, or it is confined to adding support for these new versions?
I had an SR early this year looking for help to get more precise feedback than a particularly cryptic run-time exception was able to provide. Through the SR, I provided some feedback on how I worked through the issue in the end, and was told it would be passed on to Product Planning.
Given the increasing number of opportunities we have which incorporate Python in some way, I'm interested to see this interface mature. For example, this post on the Idea Exchange (https://forums.ni.com/t5/LabVIEW-Idea-Exchange/Console-for-Python-Node/idi-p/4008486?profile.languag...) would have been a boon during my troubleshooting.
04-30-2021 05:09 PM
I can confirm that Product Planning and R&D received your feedback. We haven't yet added features in response, but we're considering improvements for future releases.
I'd like to get your feedback on an unpublished feature that's in LabVIEW 2018 and later. If you edit your INI file to contain "ShowConsoleForPythonNode=TRUE" then a window will open when a Python Node executes to show the output from Python. Do you think this functionality is useful enough that it should be presented in the LabVIEW editor?
05-02-2021 05:18 PM
@Christina_R wrote:
Do you think this functionality is useful enough that it should be presented in the LabVIEW editor?
I would like to be able to enable it in LabVIEW. How would it be presented in LabVIEW?
05-02-2021 05:20 PM
@Christina_R wrote:The Open Python Session function now takes an optional parameter for the path to the Python executable:
Does this mean that you would point LabVIEW to use Python Virtual Environment you have setup somewhere else on disk?
05-03-2021 01:59 PM
@Eisenwr wrote:
@Christina_R wrote:
Do you think this functionality is useful enough that it should be presented in the LabVIEW editor?
I would like to be able to enable it in LabVIEW. How would it be presented in LabVIEW?
We don't currently have a plan in place, so I'd like to hear your thoughts. Perhaps a checkbox in Tools»Options?
05-05-2021 02:50 PM
@Eisenwr wrote:
@Christina_R wrote:The Open Python Session function now takes an optional parameter for the path to the Python executable:
Does this mean that you would point LabVIEW to use Python Virtual Environment you have setup somewhere else on disk?
Currently, LabVIEW does not fully support Python virtual environments, but we're considering it for a future release.
05-07-2021 08:21 PM
@Christina_R wrote:
@Eisenwr wrote:
@Christina_R wrote:
Do you think this functionality is useful enough that it should be presented in the LabVIEW editor?
I would like to be able to enable it in LabVIEW. How would it be presented in LabVIEW?
We don't currently have a plan in place, so I'd like to hear your thoughts. Perhaps a checkbox in Tools»Options?
That would be the absolute minimum. I am thinking it is setting that people would want to dynamically change. I would prefer it to be an optional input to the Open Python Session VI.
05-07-2021 08:25 PM
@Christina_R wrote:
@Eisenwr wrote:
@Christina_R wrote:The Open Python Session function now takes an optional parameter for the path to the Python executable:
Does this mean that you would point LabVIEW to use Python Virtual Environment you have setup somewhere else on disk?
Currently, LabVIEW does not fully support Python virtual environments, but we're considering it for a future release.
Is this feature expected to be used currently to help when python is not in the system path directories?
05-09-2021 12:52 PM
Labview 2021 example C:\Program Files\National Instruments\LabVIEW 2021\examples\Connectivity\Python\support\NumpyExampleModule.py returns error
Python Node in PythonNode_NumpyMatmul.vi<APPEND>
Python returned the following error: Numpy package not installed.
Tried debugging since numpy package is actually installed using using the feature ShowConsoleForPythonNode=TRUE
and got this message
UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
from . import _distributor_init
Installed mkl-service package as suggested by error message but no luck.