4.4.1 Upgrade OML4Py from 1.0 to 2.0 in DB 19c/21c Standalone
If you already have the OML4Py server 1.0 installed in the on-premises Oracle Database 19c or 21c, you can run the OML4Py 2.0 server Perl script to upgrade OML4Py server to 2.0.
The following instructions tell you how to upgrade to OML4Py server 2.0:
- Check if a directory named
oml4pyexists in the$ORACLE_HOMEdirectory.- If the directory
oml4pydoes not exist in the$ORACLE_HOMEdirectory, create it.mkdir $ORACLE_HOME/oml4py - If the
oml4pydirectory already exists, clean up the server folder.rm -rf $ORACLE_HOME/oml4py/server
- If the directory
- Download the installation file for your system.
- Go to the Oracle Machine Learning for Python Downloadspage on the Oracle Technology Network.
- Accept the license agreement and select Oracle Machine Learning for Python Downloads (v2.0).
- Select Oracle Machine Learning for Python Server Install for Oracle Database on Linux 64 bit.
- Save the file to the
$ORACLE_HOME/oml4pydirectory.
- To extract the installation file to
$ORACLE_HOME/oml4pydirectory, use the command:unzip oml4py-server-linux-x86_64-2.0.zip -d $ORACLE_HOME/oml4py - Set the
PYTHONPATHenvironment variable prior to running the server installation script so that Python can find the installedomlmodules:export PYTHONPATH=$ORACLE_HOME/oml4py/modules - From the
$ORACLE_HOME/oml4pydirectory, run the server installation perl script to upgrade. The following command runs the script in interactive mode:perl -Iserver server/server.pl - The Perl script will detect the existing version 1.0 and ask whether to
proceed to upgrade to 2.0. Enter
yoryes. The output of a successful upgrade is as follows:Oracle Machine Learning for Python 2.0 Server. Copyright (c) 2018, 2023 Oracle and/or its affiliates. All rights reserved. Checking platform .................. Pass Checking ORACLE_HOME ............... Pass Checking ORACLE_SID ................ Pass Checking sqlplus ................... Pass Checking ORACLE instance ........... Pass Checking CDB/PDB ................... Pass Checking OML4Py Server ............. Pass Checking Python .................... Pass Checking module dependencies ....... Pass Checking Python libraries .......... Pass Checking OML4Py version ............ Pass Current configuration ORACLE_HOME ...................... /u01/app/oracle/product/19.3/dbhome_1 ORACLE_SID ....................... orcl Python Version ................... 3.12.0 PYTHONHOME ....................... /u01/app/oracle/product/19.3/dbhome_1/python Existing OML4Py data and code .... 1.0 Existing OML4Py embed component .. 1.0 Existing OML4Py module version ... 1.0 Upgrading to OML4Py .............. 2.0 Operation ........................ Upgrade Proceed? [yes]y Found existing installation: oml 1.0 Uninstalling oml-1.0: Successfully uninstalled oml-1.0 Removing embedded python libraries .. Pass Copying embedded python libraries ... Pass Processing ./server/oml-2.0-cp312-cp312-linux_x86_64.whl Installing collected packages: oml Successfully installed oml-2.0 Upgrading PYQSYS 1.0 to 2.0 ......... Pass Done
Parent topic: Install OML4Py Server for On-Premises Oracle Database