Enable the Bridge between OML and Python on Windows
- Install/build Python 3.8.10 , Numpy 1.22.1, and scipy 1.6.1.
-
Enable omlpythonbridge toolbox loading.
Add the command loadtoolbox omlpythonbridge in the file <INSTALLATION_HOME>\OpenMatrix\scripts\loadtoolboxes.oml.
-
In the file
<INSTALLATION_HOME>\OpenMatrix\scripts\run_omlconsole.bat, adapt
the .bat file to specific paths on your machine by adding the
following:
-
Set the environment variable OML_PYTHONHOME to point to Python home.
set OML_PYTHONHOME=C:/python/python3.8.10
-
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
-
Set the environment variable OML_PYTHONHOME to point to Python home.