Prerequisites
- Python 3.8.x and above
Note:
Ensure the libraries, bzip2-devel, sqlite-devel, ncurses-devel, and xz-devel, libffi-devel are installed before you install the Python package.For Example:
Note:
Install the below libraries as a root user.- bzip2-devel: Execute the
command
yum install bzip2-devel - sqlite-devel: Install as a
root user using the command
yum install sqlite-devel - ncurses-devel: Install as a
root user using the command
yum install ncurses-devel - xz-devel: Install as a root
user using the command
yum install xz-devel - libffi-devel: Install as a
root user using the command
yum install libffi-devel
- bzip2-devel: Execute the
command
Note:
In order to download the latest python packages after MMG upgrade, the pip cache in the server user home directory needs to be cleared.Path: $HOME/.cache/pip
Installing the OFS MMG Python Library and Dependencies (python-env-install.sh)
The python-env-install.sh script is available in the following location:
<MMG_INSTALLED_DIR>/OFS_MMG/bin
Set the python3 interpreter to the environment that you intend to use and navigate to the following folder:
<INSTALLER_DIR>/OFS_MMG/bin
conf/requirements.txt, execute one of the following commands:
- System / shared Python installation (requires permission to write to site-packages):
./python-env-install.sh - User-level installation (use this when packages must be installed at user level / you do not have permission to write to site-packages):
./python-env-install.sh --userThe
--useroption installs the packages under the invoking user¿s local Python package directory.
Conda environment installation:
The --user option is not required when using a Conda environment. Ensure that python3 is pointing to the intended Conda environment before running the script.
To install the OFS MMG library with flexible dependencies or if you are using the already installed dependent packages, then execute the following command:
./python-env-install.sh -S
or
./python-env-install.sh --skip
This skips the dependency installation based on the versions as specified in conf/requirements.txt and proceeds with the versions available in the configured package repository.
To install the Apache Flink Python packages, execute:
./python-env-install.sh --include-flink