Enable the Bridge between OML and Python on Windows

  1. Install/build Python 3.8.10 , Numpy 1.22.1, and scipy 1.6.1.
  2. Enable omlpythonbridge toolbox loading.
    Add the command loadtoolbox omlpythonbridge in the file <INSTALLATION_HOME>\OpenMatrix\scripts\loadtoolboxes.oml.
  3. In the file <INSTALLATION_HOME>\OpenMatrix\scripts\run_omlconsole.bat, adapt the .bat file to specific paths on your machine by adding the following:
    1. Set the environment variable OML_PYTHONHOME to point to Python home.
      set OML_PYTHONHOME=C:/python/python3.8.10
    2. Add the Python DLL (python38.dll) location to the environment variable “PATH”.
      set path= C:/python/python3.8.10;%path%
    Note: omlpythonbridge toolbox is built using Python binaries, which are built with Visual Studio 2015 (win64) Update 2, Intel 2016 Update 2 Fortran and C++ compilers. It is advised to use Python binaries built using the same compiler versions.
    Note: OpenMatrix binaries are built using Visual Studio 2019 (win64) Update 2.
    Note: Verified using Python 3.8.10 binaries installed from https://www.python.org/downloads. Installed Numpy, Scipy, Matplotlib using pip.
    • Python.exe -m pip install numpy==1.22.1
    • Python.exe -m pip install scipy==1.6.1
    • Python.exe -m pip install matplotlib==3.3.0