4.4.1 DB 19cスタンドアロンでのOML4Pyの1.0から2.0へのアップグレード
オンプレミスのOracle Database 19cまたは21cにOML4Pyサーバー1.0がすでにインストールされている場合は、OML4Py 2.0サーバーPerlスクリプトを実行してOML4Pyサーバーを2.0にアップグレードできます。
次の手順では、OML4Pyサーバー2.0にアップグレードする方法について説明します:
-
oml4py
というディレクトリが$ORACLE_HOME
ディレクトリに存在するかどうかを確認します。oml4py
ディレクトリが$ORACLE_HOME
ディレクトリに存在しない場合は、それを作成します。mkdir $ORACLE_HOME/oml4py
oml4py
ディレクトリがすでに存在する場合は、そのサーバー・フォルダをクリーン・アップします。rm -rf $ORACLE_HOME/oml4py/server
- システムのインストール・ファイルをダウンロードします。
- Oracle Technology Networkの「Oracle Machine Learning for Python Downloads」ページにアクセスします。
- ライセンス契約に同意し、Oracle Machine Learning for Python Downloads (v2.0)を選択します。
- Oracle Machine Learning for Python Server Install for Oracle Database on Linux 64 bitを選択します。
- ファイルを
$ORACLE_HOME/oml4py
ディレクトリに保存します。
- インストール・ファイルを
$ORACLE_HOME/oml4py
ディレクトリに抽出するには、次のコマンドを使用します。unzip oml4py-server-linux-x86_64-2.0.zip -d $ORACLE_HOME/oml4py
- インストールされた
oml
モジュールをPythonで検出できるように、サーバー・インストール・スクリプトを実行する前にPYTHONPATH
環境変数を設定します。export PYTHONPATH=$ORACLE_HOME/oml4py/modules
$ORACLE_HOME/oml4py
ディレクトリから、サーバー・インストールperlスクリプトを実行してアップグレードします。次のコマンドは、スクリプトを対話モードで実行します。perl -Iserver server/server.pl
- このPerlスクリプトにより、既存のバージョン1.0が検出され、2.0へのアップグレードに進むかどうかを尋ねられます。
y
またはyes
を入力します。アップグレードに成功した場合の出力は次のとおりです: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