From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to load specified version of python

Hallo,

 

Tested with:

  • TestStand 2020 (32 bit) and TestStand 2019 (32 bit)
  • Python 3.6.11, 3.8.7, 3.9.1 (all 32 bit)

on Windows 10

 

when trying to use a Python Action I always get an "Unable to load specified version of python".

That happens with custom Python scripts as well as with the included examples.

 

pythonError.png

 

 

 

 

 

 

 

In each case I selected the specific Version under Configure > Adapters ... > Python.

I also made sure the right version was specified in PATH. I tested that with cmd > python --version.

 

Workaround at the moment:

Use an "Call Executable"-Step and call python with the script name and variables as arguments.

That works well for simple scripts but should not be necessary and fails on more complex tasks.

 

Any idea what I'm doing wrong?

 

Greetings

Max

 

0 Kudos
Message 1 of 11
(2,768 Views)

Hello

 

It is possible that you didn't provided a reference to the python properly.

Have you seen this article?

0 Kudos
Message 2 of 11
(2,675 Views)

That is exactly what I did. With different versions and non of them worked so far...

0 Kudos
Message 3 of 11
(2,664 Views)

Have you tried to reinstall TestStand?

0 Kudos
Message 4 of 11
(2,639 Views)

since I had to setup a second machine anyways, yes I did there, with the same result.

0 Kudos
Message 5 of 11
(2,634 Views)

Hi there

Is this issue is still relevant?

0 Kudos
Message 6 of 11
(2,587 Views)

Yes and no...

 

Did not find a solution yet but as mentioned used a workaround. Not pretty but works for me for now. Can be closed I guess

0 Kudos
Message 7 of 11
(2,582 Views)

@xack

I also was confused by this kind of error. Finally, I found out how to fix this issue, including LabVIEW. Some steps must be followed:

  1. Need to find the “niPythonHost.exe” on your pc(refer to the everything application);
  2. Copy the application to the LabVIEW and TestStand root directory;Carey_Cheng_1-1663741118234.png

     

  3. Done.

Of course, have to make sure that the same bitness and there is a path of python in the environment path.

0 Kudos
Message 8 of 11
(2,083 Views)

Having the same issue, both TestStand 32-bit and Python 32-bit are installed and the PATH variable is correct.

 

The TestStand Adapter cannot find the Python Interpreter.  Every other Windows program can (i.e. CMD, VSCode, PyCharm, ...etc.).

 

This looks to be a common problem:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA03q000000YITnCAO&l=en-US

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000g0jUSAQ&l=en-US

 

Is this a TestStand bug??

0 Kudos
Message 9 of 11
(1,080 Views)

I noticed this knowledge article https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Wf3SAE&l=en-US mentioned Python 2.7.0 or 3.6.0

 

"If you are using TestStand 32 bit version use Python 2.7.0 or 3.6.0, 32 bit version."

 

So I installed Python 3.6.8 and TestStand 32-bit was able to detect Python 3.6 32-bit.  Installing Python 3.6.8 worked.

 

This is not mentioned anywhere in the other knowledge articles. 🙄

0 Kudos
Message 10 of 11
(1,071 Views)