VeriStand Python API Fails to Install "Error: Option --Single-Version-Externally-Managed Not Recognized" with Python 3.9 or 3.10

Updated Feb 15, 2022

Reported In

Software

  • VeriStand

Programming Language

  • Python

Issue Details

I am trying to install the VeriStand Python API while using Python 3.9 or 3.10.
It seems like niveristand, pythonnet. PyYAML and pycparser are downloaded but then an error states:
Using legacy 'setup.py install' for pythonnet, since 'wheel' is not installed.
Installing collected packages pycparser, PyYAML, pythonnet, niveristand
Running setup.py install for pythonnet ... error
ERROR: Command errored out with exit status 1

The error message also states:

error: option --single-version-externally-managed not recognized

I have Wheel installed (pip install -U wheel) and updated (pip install --upgrade wheel) but the error remains the same.

Solution

This is a known issue with pythonnet that occurs when using Python 3.9 or 3.10: Pythonnet does not install on Python 3.10 · Issue #1600 · pythonnet/pythonnet · GitHub.

This issue can be worked around by using the command:
pip install --pre pythonnet

Once that command has finished, you can install the Python VeriStand API by running the normal commands:

pip install niveristand

Or any of the options detailed in VeriStand Python Documentation

Additional Information

If you are hoping to install the Python VeriStand API on an offline machine, you will need to install the following packages:
  • PyYAML
  • Pycparser
  • Pythonnet
  • Cffi
  • Clr-loader
From there, ensure wheel is installed and then download the Python VeriStand API source file (.whl) from the Download Files tab of niveristand · PyPI.

With the list of packages installed, you can use the cd command to navigate to the niveristand-2.0.1-py2.py3-none-any.whl file you have just downloaded and then run the command:

pip install niveristand-2.0.1-py2.py3-none-any.whl