1

I am currently attempting to set up Matlab to work with Volttron on a Linux virtual machine. Python 3.8, Volttron, and Matlab are all installed on the virtual machine. When I run pyversion python.exe in the command window I get this error:

Error using pyversion

Path argument does not specify a valid executable.

Running pe = pyenv; and pe.Version returns blank, as does pyversion. This document describes a way to set the version used and I believe this ought to be my next step. However, the instructions say that for Linux I should run pyenv('Version','executable') but python is already installed and to my knowledge on linux does not have an executable file one can download for python. How can I remedy this?

Aristeian
  • 11
  • 1
  • There should be no `python.exe` for Linux (`exe` is Windows executable format). Try using `/usr/bin/python` instead (if `matlab` doesn't like symlinks, then `/usr/bin/python3.x`, where `x` is version installed (6, 7, etc.)). – STerliakov Mar 31 '22 at 20:23

1 Answers1

0

If you have followed the recommended steps to setup VOLTTRON, and are running VOLTTRON within a virtual environment, the python version to use should be located within that virtual environment at env/bin/python.

As mentioned in this answer, if you want to verify the path, you can activate the environment using source env/bin/activate, and then run python. Once inside the python interpreter, you would just need to print the system executable.

import sys
print(sys.executable)

It is worth noting that this is an older method for connecting to MatLab with VOLTTRON. You may want to try using the newer MatLab agents. The documentation for this method is included with the example agents. https://volttron.readthedocs.io/en/latest/developing-volttron/developing-agents/example-agents/matlab-agent.html

The new method also assumes that MatLab is running in a separate Windows environment. In your case, you would install the standalone MatLab Agent within the linux virtual machine, and proceed accordingly.