Solution
To use Python script in TestStand, kindly ensure the Python script is in a virtual environment directory. Instructions below demonstrate an example on how to create a virtual environment directory for add.py Python script located in Desktop's PyTs folder.
- Open Command Prompt and install virtualenv package by using the following command
pip install virtualenv
- Change command prompt directory to Desktop since PyTs folder is located at Desktop
- Create virtual environment for PyTs folder by using the following code
virtualenv PyTs
- Once the virtual environment creation is done, reconfigure Python adapter by pointing Python virtual environment to the PyTs folder.
Python script can now be used in TestStand without invalid virtual environment path error