Editing the PATH Environment Variable for TestStand’s Python Adapter

Updated Nov 24, 2020

Reported In

Software

  • TestStand

Issue Details

How do I configure the PATH Environment Variable so that TestStand references the proper Python installation?

Solution

Note: Before proceeding, ensure that the bitness of Python installed matches the bitness of the environment you are working in. For example, if working in 32-bit TestStand, you must also use 32-bit Python for functionality and interfacing to work in the TestStand environment. 

It is best practice to add a path to the Python version to your PATH environment variable. You can change the PATH environment variable on Windows 10 with the following steps:
 
  1. Open File Explorer
  2. Right click on This PC and select Properties.
  3. Click on Advanced system settings.
  4. Make sure you are on the Advanced tab and click on Environment Variables.
  5. Select the Path variable under User variables of <username> and click Edit. You can also select the Path variable under System Variables if you want to edit the system path. 
  6. Click New to add additional environment variables. You should add paths to the Python Installation and the scripts folder. 

An example of a properly configured PATH environment variable is provided below for a Windows 10 machine with Python installed at the top of the C drive. Paths to both the Python folder and the Scripts folder should be included.
 

You may need to restart TestStand and any TestStand tools for the Python Adapter to utilize the edited environment variable.