OML4Y란?
Oracle Machine Learning for Python 의 줄임말로, python을 머신러닝을 통해서 데이터 분석에 활용하는 컴포넌트입니다.
데이터 변환을 위해서 파이썬 명령와 파이썬 API를 사용하여 Oracle DB에 저장된 데이터에 대한 분석을 할 수 있습니다.
이번에 설치한 Free버전에서 어디까지 테스트가 될지는 모르겠지만, 먼저 client를 설치하는 방법을 정리하겠습니다.
설치파일은 아래 URL에서 다운받을 수 있습니다.
https://www.oracle.com/database/technologies/oml4py-downloads.html#license-lightbox
파일 이름은 oml4py-client-linux-x86_64-2.0.zip입니다.
OS 환경은 Centos 9이고 23ai free버전이 설치된 직후의 환경입니다.
23ai 버전설치는 아래글을 참조바랍니다.
https://bae9086.tistory.com/566
1.bash_profile에 python 관련 환경변수 추가하기
python은 oracle을 설치할때 같이 설치된 python 3을 이용하도록 하겠습니다.
#oracle 유저로 수행
su - oracle
vi .bash_profile
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/23ai/dbhomeFree
export ORACLE_SID=FREE
export NLS_LANG=KOREAN_KOREA.UTF8
export PYTHONHOME=$ORACLE_HOME/python
export PATH=$ORACLE_HOME/bin:$PYTHONHOME/bin:$PATH
export LD_LIBRARY_PATH=$PYTHONHOME/lib:$LD_LIBRARY_PATH
2.pip사용가능하게 하기.
pip는 package installer for Python 의 약자로써 python에서 사용가능한 패키지들을 설치가능하게 하는 명령어입니다.
설치가 안되어있으면 root로 설치를 진행 후 진행합니다.
pip가 설치되지 않았을 때
$ pip install --upgrade pip
-bash: pip: command not found
yum 명령어가 dnf로 변경되었습니다. 기능은 동일합니다.
#root로 수행
# dnf -y install pip
Last metadata expiration check: 0:18:36 ago on Wed 06 Nov 2024 02:52:48 AM EST.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Installing:
python3-pip noarch 21.3.1-1.el9 appstream 2.0 M
Transaction Summary
=============================================================================================================================================================
Install 1 Package
Total download size: 2.0 M
Installed size: 8.8 M
Downloading Packages:
python3-pip-21.3.1-1.el9.noarch.rpm 3.6 MB/s | 2.0 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.1 MB/s | 2.0 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : python3-pip-21.3.1-1.el9.noarch 1/1
Running scriptlet: python3-pip-21.3.1-1.el9.noarch 1/1
Verifying : python3-pip-21.3.1-1.el9.noarch 1/1
Installed:
python3-pip-21.3.1-1.el9.noarch
Complete!
3.필요한 패키지 설치
root로 수행합니다. 마찬가지로 dnf 명령어로 수행합니다.
dnf -y install perl-Env libffi-devel openssl openssl-devel tk-devel xz-devel zlib-devel bzip2-devel readline-devel libuuid-devel ncurses-devel
# dnf -y install perl-Env libffi-devel openssl openssl-devel tk-devel xz-devel zlib-devel bzip2-devel readline-devel libuuid-devel ncurses-devel
Last metadata expiration check: 0:22:12 ago on Wed 06 Nov 2024 02:52:48 AM EST.
Package openssl-1:3.2.2-6.el9.x86_64 is already installed.
Package openssl-devel-1:3.2.2-6.el9.x86_64 is already installed.
Package xz-devel-5.2.5-8.el9.x86_64 is already installed.
Package zlib-devel-1.2.11-41.el9.x86_64 is already installed.
Dependencies resolved.
=============================================================================================================================================================
Package Architecture Version Repository Size
=============================================================================================================================================================
Installing:
bzip2-devel x86_64 1.0.8-8.el9 appstream 215 k
libffi-devel x86_64 3.4.2-8.el9 appstream 29 k
libuuid-devel x86_64 2.37.4-20.el9 appstream 24 k
ncurses-devel x86_64 6.2-10.20210508.el9 appstream 518 k
perl-Env noarch 1.04-460.el9 appstream 20 k
readline-devel x86_64 8.1-4.el9 appstream 202 k
tk-devel x86_64 1:8.6.10-9.el9 appstream 552 k
Installing dependencies:
brotli x86_64 1.0.9-6.el9 appstream 313 k
brotli-devel x86_64 1.0.9-6.el9 appstream 32 k
cmake-filesystem x86_64 3.26.5-2.el9 appstream 19 k
fontconfig-devel x86_64 2.14.0-2.el9 appstream 174 k
freetype-devel x86_64 2.10.4-9.el9 appstream 1.1 M
glib2-devel x86_64 2.68.4-16.el9 appstream 552 k
graphite2-devel x86_64 1.3.14-9.el9 appstream 22 k
harfbuzz-devel x86_64 2.7.4-10.el9 appstream 347 k
harfbuzz-icu x86_64 2.7.4-10.el9 appstream 14 k
libX11-devel x86_64 1.7.0-10.el9 appstream 1.1 M
libXau-devel x86_64 1.0.9-8.el9 appstream 14 k
libXft-devel x86_64 2.3.3-8.el9 appstream 19 k
libXrender-devel x86_64 0.9.10-16.el9 appstream 17 k
libblkid-devel x86_64 2.37.4-20.el9 appstream 17 k
libicu-devel x86_64 67.1-9.el9 appstream 938 k
libmount-devel x86_64 2.37.4-20.el9 appstream 18 k
libpng-devel x86_64 2:1.6.37-12.el9 appstream 293 k
libselinux-devel x86_64 3.6-2.el9 appstream 159 k
libsepol-devel x86_64 3.6-1.el9 appstream 47 k
libxcb-devel x86_64 1.13.1-9.el9 appstream 1.5 M
libxml2-devel x86_64 2.9.13-6.el9 appstream 898 k
ncurses-c++-libs x86_64 6.2-10.20210508.el9 appstream 37 k
pcre-cpp x86_64 8.44-4.el9 appstream 26 k
pcre-devel x86_64 8.44-4.el9 appstream 506 k
pcre-utf16 x86_64 8.44-4.el9 appstream 184 k
pcre-utf32 x86_64 8.44-4.el9 appstream 174 k
pcre2-devel x86_64 10.40-6.el9 appstream 512 k
pcre2-utf16 x86_64 10.40-6.el9 appstream 214 k
pcre2-utf32 x86_64 10.40-6.el9 appstream 203 k
perl-Tie noarch 4.6-481.el9 appstream 31 k
sysprof-capture-devel x86_64 3.40.1-3.el9 appstream 60 k
tcl x86_64 1:8.6.10-7.el9 baseos 1.1 M
tcl-devel x86_64 1:8.6.10-7.el9 appstream 169 k
tk x86_64 1:8.6.10-9.el9 appstream 1.6 M
xorg-x11-proto-devel noarch 2024.1-1.el9 appstream 310 k
Transaction Summary
=============================================================================================================================================================
Install 42 Packages
Total download size: 14 M
Installed size: 51 M
Downloading Packages:
(1/42): brotli-devel-1.0.9-6.el9.x86_64.rpm 239 kB/s | 32 kB 00:00
(2/42): brotli-1.0.9-6.el9.x86_64.rpm 1.9 MB/s | 313 kB 00:00
(3/42): cmake-filesystem-3.26.5-2.el9.x86_64.rpm 255 kB/s | 19 kB 00:00
(4/42): tcl-8.6.10-7.el9.x86_64.rpm 3.6 MB/s | 1.1 MB 00:00
(5/42): fontconfig-devel-2.14.0-2.el9.x86_64.rpm 2.5 MB/s | 174 kB 00:00
(6/42): bzip2-devel-1.0.8-8.el9.x86_64.rpm 923 kB/s | 215 kB 00:00
(7/42): glib2-devel-2.68.4-16.el9.x86_64.rpm 6.3 MB/s | 552 kB 00:00
(8/42): graphite2-devel-1.3.14-9.el9.x86_64.rpm 567 kB/s | 22 kB 00:00
(9/42): harfbuzz-icu-2.7.4-10.el9.x86_64.rpm 717 kB/s | 14 kB 00:00
(10/42): harfbuzz-devel-2.7.4-10.el9.x86_64.rpm 4.8 MB/s | 347 kB 00:00
(11/42): libXau-devel-1.0.9-8.el9.x86_64.rpm 722 kB/s | 14 kB 00:00
(12/42): libXft-devel-2.3.3-8.el9.x86_64.rpm 325 kB/s | 19 kB 00:00
(13/42): libXrender-devel-0.9.10-16.el9.x86_64.rpm 286 kB/s | 17 kB 00:00
(14/42): libblkid-devel-2.37.4-20.el9.x86_64.rpm 933 kB/s | 17 kB 00:00
(15/42): libffi-devel-3.4.2-8.el9.x86_64.rpm 1.5 MB/s | 29 kB 00:00
(16/42): libicu-devel-67.1-9.el9.x86_64.rpm 4.0 MB/s | 938 kB 00:00
(17/42): libX11-devel-1.7.0-10.el9.x86_64.rpm 2.3 MB/s | 1.1 MB 00:00
(18/42): libmount-devel-2.37.4-20.el9.x86_64.rpm 564 kB/s | 18 kB 00:00
(19/42): libselinux-devel-3.6-2.el9.x86_64.rpm 2.8 MB/s | 159 kB 00:00
(20/42): libsepol-devel-3.6-1.el9.x86_64.rpm 1.8 MB/s | 47 kB 00:00
(21/42): libpng-devel-1.6.37-12.el9.x86_64.rpm 2.0 MB/s | 293 kB 00:00
(22/42): libuuid-devel-2.37.4-20.el9.x86_64.rpm 409 kB/s | 24 kB 00:00
(23/42): freetype-devel-2.10.4-9.el9.x86_64.rpm 1.4 MB/s | 1.1 MB 00:00
(24/42): ncurses-c++-libs-6.2-10.20210508.el9.x86_64.rpm 1.1 MB/s | 37 kB 00:00
(25/42): libxml2-devel-2.9.13-6.el9.x86_64.rpm 3.4 MB/s | 898 kB 00:00
(26/42): pcre-cpp-8.44-4.el9.x86_64.rpm 1.4 MB/s | 26 kB 00:00
(27/42): ncurses-devel-6.2-10.20210508.el9.x86_64.rpm 2.0 MB/s | 518 kB 00:00
(28/42): libxcb-devel-1.13.1-9.el9.x86_64.rpm 4.3 MB/s | 1.5 MB 00:00
(29/42): pcre-devel-8.44-4.el9.x86_64.rpm 3.8 MB/s | 506 kB 00:00
(30/42): pcre-utf16-8.44-4.el9.x86_64.rpm 2.1 MB/s | 184 kB 00:00
(31/42): pcre-utf32-8.44-4.el9.x86_64.rpm 2.6 MB/s | 174 kB 00:00
(32/42): pcre2-utf16-10.40-6.el9.x86_64.rpm 3.1 MB/s | 214 kB 00:00
(33/42): pcre2-utf32-10.40-6.el9.x86_64.rpm 2.0 MB/s | 203 kB 00:00
(34/42): pcre2-devel-10.40-6.el9.x86_64.rpm 4.2 MB/s | 512 kB 00:00
(35/42): perl-Tie-4.6-481.el9.noarch.rpm 1.5 MB/s | 31 kB 00:00
(36/42): perl-Env-1.04-460.el9.noarch.rpm 322 kB/s | 20 kB 00:00
(37/42): readline-devel-8.1-4.el9.x86_64.rpm 3.2 MB/s | 202 kB 00:00
(38/42): sysprof-capture-devel-3.40.1-3.el9.x86_64.rpm 767 kB/s | 60 kB 00:00
(39/42): tcl-devel-8.6.10-7.el9.x86_64.rpm 1.4 MB/s | 169 kB 00:00
(40/42): tk-devel-8.6.10-9.el9.x86_64.rpm 3.0 MB/s | 552 kB 00:00
(41/42): xorg-x11-proto-devel-2024.1-1.el9.noarch.rpm 1.8 MB/s | 310 kB 00:00
(42/42): tk-8.6.10-9.el9.x86_64.rpm 4.4 MB/s | 1.6 MB 00:00
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 4.5 MB/s | 14 MB 00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : xorg-x11-proto-devel-2024.1-1.el9.noarch 1/42
Installing : tcl-1:8.6.10-7.el9.x86_64 2/42
Installing : tcl-devel-1:8.6.10-7.el9.x86_64 3/42
Running scriptlet: tk-1:8.6.10-9.el9.x86_64 4/42
Installing : tk-1:8.6.10-9.el9.x86_64 4/42
Installing : libXau-devel-1.0.9-8.el9.x86_64 5/42
Installing : libxcb-devel-1.13.1-9.el9.x86_64 6/42
Installing : libX11-devel-1.7.0-10.el9.x86_64 7/42
Installing : libXrender-devel-0.9.10-16.el9.x86_64 8/42
Installing : sysprof-capture-devel-3.40.1-3.el9.x86_64 9/42
Installing : perl-Tie-4.6-481.el9.noarch 10/42
Installing : pcre2-utf32-10.40-6.el9.x86_64 11/42
Installing : pcre2-utf16-10.40-6.el9.x86_64 12/42
Installing : pcre2-devel-10.40-6.el9.x86_64 13/42
Installing : pcre-utf32-8.44-4.el9.x86_64 14/42
Installing : pcre-utf16-8.44-4.el9.x86_64 15/42
Installing : pcre-cpp-8.44-4.el9.x86_64 16/42
Installing : pcre-devel-8.44-4.el9.x86_64 17/42
Installing : ncurses-c++-libs-6.2-10.20210508.el9.x86_64 18/42
Installing : ncurses-devel-6.2-10.20210508.el9.x86_64 19/42
Installing : libsepol-devel-3.6-1.el9.x86_64 20/42
Installing : libselinux-devel-3.6-2.el9.x86_64 21/42
Installing : libpng-devel-2:1.6.37-12.el9.x86_64 22/42
Installing : libicu-devel-67.1-9.el9.x86_64 23/42
Installing : libffi-devel-3.4.2-8.el9.x86_64 24/42
Installing : libblkid-devel-2.37.4-20.el9.x86_64 25/42
Installing : libmount-devel-2.37.4-20.el9.x86_64 26/42
Installing : glib2-devel-2.68.4-16.el9.x86_64 27/42
Installing : harfbuzz-icu-2.7.4-10.el9.x86_64 28/42
Installing : graphite2-devel-1.3.14-9.el9.x86_64 29/42
Installing : cmake-filesystem-3.26.5-2.el9.x86_64 30/42
Installing : libxml2-devel-2.9.13-6.el9.x86_64 31/42
Installing : bzip2-devel-1.0.8-8.el9.x86_64 32/42
Installing : brotli-1.0.9-6.el9.x86_64 33/42
Installing : brotli-devel-1.0.9-6.el9.x86_64 34/42
Installing : harfbuzz-devel-2.7.4-10.el9.x86_64 35/42
Installing : freetype-devel-2.10.4-9.el9.x86_64 36/42
Installing : fontconfig-devel-2.14.0-2.el9.x86_64 37/42
Installing : libXft-devel-2.3.3-8.el9.x86_64 38/42
Installing : tk-devel-1:8.6.10-9.el9.x86_64 39/42
Installing : readline-devel-8.1-4.el9.x86_64 40/42
Installing : perl-Env-1.04-460.el9.noarch 41/42
Installing : libuuid-devel-2.37.4-20.el9.x86_64 42/42
Running scriptlet: libuuid-devel-2.37.4-20.el9.x86_64 42/42
Verifying : tcl-1:8.6.10-7.el9.x86_64 1/42
Verifying : brotli-1.0.9-6.el9.x86_64 2/42
Verifying : brotli-devel-1.0.9-6.el9.x86_64 3/42
Verifying : bzip2-devel-1.0.8-8.el9.x86_64 4/42
Verifying : cmake-filesystem-3.26.5-2.el9.x86_64 5/42
Verifying : fontconfig-devel-2.14.0-2.el9.x86_64 6/42
Verifying : freetype-devel-2.10.4-9.el9.x86_64 7/42
Verifying : glib2-devel-2.68.4-16.el9.x86_64 8/42
Verifying : graphite2-devel-1.3.14-9.el9.x86_64 9/42
Verifying : harfbuzz-devel-2.7.4-10.el9.x86_64 10/42
Verifying : harfbuzz-icu-2.7.4-10.el9.x86_64 11/42
Verifying : libX11-devel-1.7.0-10.el9.x86_64 12/42
Verifying : libXau-devel-1.0.9-8.el9.x86_64 13/42
Verifying : libXft-devel-2.3.3-8.el9.x86_64 14/42
Verifying : libXrender-devel-0.9.10-16.el9.x86_64 15/42
Verifying : libblkid-devel-2.37.4-20.el9.x86_64 16/42
Verifying : libffi-devel-3.4.2-8.el9.x86_64 17/42
Verifying : libicu-devel-67.1-9.el9.x86_64 18/42
Verifying : libmount-devel-2.37.4-20.el9.x86_64 19/42
Verifying : libpng-devel-2:1.6.37-12.el9.x86_64 20/42
Verifying : libselinux-devel-3.6-2.el9.x86_64 21/42
Verifying : libsepol-devel-3.6-1.el9.x86_64 22/42
Verifying : libuuid-devel-2.37.4-20.el9.x86_64 23/42
Verifying : libxcb-devel-1.13.1-9.el9.x86_64 24/42
Verifying : libxml2-devel-2.9.13-6.el9.x86_64 25/42
Verifying : ncurses-c++-libs-6.2-10.20210508.el9.x86_64 26/42
Verifying : ncurses-devel-6.2-10.20210508.el9.x86_64 27/42
Verifying : pcre-cpp-8.44-4.el9.x86_64 28/42
Verifying : pcre-devel-8.44-4.el9.x86_64 29/42
Verifying : pcre-utf16-8.44-4.el9.x86_64 30/42
Verifying : pcre-utf32-8.44-4.el9.x86_64 31/42
Verifying : pcre2-devel-10.40-6.el9.x86_64 32/42
Verifying : pcre2-utf16-10.40-6.el9.x86_64 33/42
Verifying : pcre2-utf32-10.40-6.el9.x86_64 34/42
Verifying : perl-Env-1.04-460.el9.noarch 35/42
Verifying : perl-Tie-4.6-481.el9.noarch 36/42
Verifying : readline-devel-8.1-4.el9.x86_64 37/42
Verifying : sysprof-capture-devel-3.40.1-3.el9.x86_64 38/42
Verifying : tcl-devel-1:8.6.10-7.el9.x86_64 39/42
Verifying : tk-1:8.6.10-9.el9.x86_64 40/42
Verifying : tk-devel-1:8.6.10-9.el9.x86_64 41/42
Verifying : xorg-x11-proto-devel-2024.1-1.el9.noarch 42/42
Installed:
brotli-1.0.9-6.el9.x86_64 brotli-devel-1.0.9-6.el9.x86_64 bzip2-devel-1.0.8-8.el9.x86_64
cmake-filesystem-3.26.5-2.el9.x86_64 fontconfig-devel-2.14.0-2.el9.x86_64 freetype-devel-2.10.4-9.el9.x86_64
glib2-devel-2.68.4-16.el9.x86_64 graphite2-devel-1.3.14-9.el9.x86_64 harfbuzz-devel-2.7.4-10.el9.x86_64
harfbuzz-icu-2.7.4-10.el9.x86_64 libX11-devel-1.7.0-10.el9.x86_64 libXau-devel-1.0.9-8.el9.x86_64
libXft-devel-2.3.3-8.el9.x86_64 libXrender-devel-0.9.10-16.el9.x86_64 libblkid-devel-2.37.4-20.el9.x86_64
libffi-devel-3.4.2-8.el9.x86_64 libicu-devel-67.1-9.el9.x86_64 libmount-devel-2.37.4-20.el9.x86_64
libpng-devel-2:1.6.37-12.el9.x86_64 libselinux-devel-3.6-2.el9.x86_64 libsepol-devel-3.6-1.el9.x86_64
libuuid-devel-2.37.4-20.el9.x86_64 libxcb-devel-1.13.1-9.el9.x86_64 libxml2-devel-2.9.13-6.el9.x86_64
ncurses-c++-libs-6.2-10.20210508.el9.x86_64 ncurses-devel-6.2-10.20210508.el9.x86_64 pcre-cpp-8.44-4.el9.x86_64
pcre-devel-8.44-4.el9.x86_64 pcre-utf16-8.44-4.el9.x86_64 pcre-utf32-8.44-4.el9.x86_64
pcre2-devel-10.40-6.el9.x86_64 pcre2-utf16-10.40-6.el9.x86_64 pcre2-utf32-10.40-6.el9.x86_64
perl-Env-1.04-460.el9.noarch perl-Tie-4.6-481.el9.noarch readline-devel-8.1-4.el9.x86_64
sysprof-capture-devel-3.40.1-3.el9.x86_64 tcl-1:8.6.10-7.el9.x86_64 tcl-devel-1:8.6.10-7.el9.x86_64
tk-1:8.6.10-9.el9.x86_64 tk-devel-1:8.6.10-9.el9.x86_64 xorg-x11-proto-devel-2024.1-1.el9.noarch
Complete!
4.pip명령어로 python 필요 패키지 설치
oracle 계정으로 수행하며 필요한 패키지를 설치합니다.
설치는 개별로 pip install 명령어로 설치할수도 있으나 저는 txt파일을 만들어 한번에 설치되게 하였습니다.
vi a.txt
--extra-index-url https://download.pytorch.org/whl/cpu
pandas==2.1.1
setuptools==68.0.0
scipy==1.12.0
matplotlib==3.8.4
oracledb==2.2.0
scikit-learn==1.4.1.post1
numpy==1.26.4
onnxruntime==1.17.0
onnxruntime-extensions==0.10.1
onnx==1.16.0
torch==2.2.0
transformers==4.38.1
sentencepiece==0.2.0
$ pip install -r a.txt
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
Collecting pandas==2.1.1 (from -r a.txt (line 2))
Downloading pandas-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (18 kB)
Collecting setuptools==68.0.0 (from -r a.txt (line 3))
Downloading setuptools-68.0.0-py3-none-any.whl.metadata (6.4 kB)
Collecting scipy==1.12.0 (from -r a.txt (line 4))
Downloading scipy-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (60 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.4/60.4 kB 9.4 MB/s eta 0:00:00
Collecting matplotlib==3.8.4 (from -r a.txt (line 5))
Downloading matplotlib-3.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.8 kB)
Requirement already satisfied: oracledb==2.2.0 in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from -r a.txt (line 6)) (2.2.0)
Collecting scikit-learn==1.4.1.post1 (from -r a.txt (line 7))
Downloading scikit_learn-1.4.1.post1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting numpy==1.26.4 (from -r a.txt (line 8))
Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 1.7 MB/s eta 0:00:00
Collecting onnxruntime==1.17.0 (from -r a.txt (line 9))
Downloading onnxruntime-1.17.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (4.2 kB)
Collecting onnxruntime-extensions==0.10.1 (from -r a.txt (line 10))
Downloading onnxruntime_extensions-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.3 kB)
Collecting onnx==1.16.0 (from -r a.txt (line 11))
Downloading onnx-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (16 kB)
Collecting torch==2.2.0 (from -r a.txt (line 12))
Downloading https://download.pytorch.org/whl/cpu/torch-2.2.0%2Bcpu-cp312-cp312-linux_x86_64.whl (186.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 186.7/186.7 MB 5.8 MB/s eta 0:00:00
Collecting transformers==4.38.1 (from -r a.txt (line 13))
Downloading transformers-4.38.1-py3-none-any.whl.metadata (131 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 131.1/131.1 kB 16.5 MB/s eta 0:00:00
Collecting sentencepiece==0.2.0 (from -r a.txt (line 14))
Downloading sentencepiece-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (7.7 kB)
Collecting python-dateutil>=2.8.2 (from pandas==2.1.1->-r a.txt (line 2))
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz>=2020.1 (from pandas==2.1.1->-r a.txt (line 2))
Downloading pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.1 (from pandas==2.1.1->-r a.txt (line 2))
Downloading tzdata-2024.2-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting contourpy>=1.0.1 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading contourpy-1.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (5.4 kB)
Collecting cycler>=0.10 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading fonttools-4.54.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (163 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.7/163.7 kB 7.8 MB/s eta 0:00:00
Collecting kiwisolver>=1.3.1 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading kiwisolver-1.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.3 kB)
Collecting packaging>=20.0 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading https://download.pytorch.org/whl/packaging-24.1-py3-none-any.whl (53 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.0/54.0 kB 4.4 MB/s eta 0:00:00
Collecting pillow>=8 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading pillow-11.0.0-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (9.1 kB)
Collecting pyparsing>=2.3.1 (from matplotlib==3.8.4->-r a.txt (line 5))
Downloading pyparsing-3.2.0-py3-none-any.whl.metadata (5.0 kB)
Requirement already satisfied: cryptography>=3.2.1 in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from oracledb==2.2.0->-r a.txt (line 6)) (42.0.7)
Collecting joblib>=1.2.0 (from scikit-learn==1.4.1.post1->-r a.txt (line 7))
Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)
Collecting threadpoolctl>=2.0.0 (from scikit-learn==1.4.1.post1->-r a.txt (line 7))
Downloading threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)
Collecting coloredlogs (from onnxruntime==1.17.0->-r a.txt (line 9))
Downloading coloredlogs-15.0.1-py2.py3-none-any.whl.metadata (12 kB)
Collecting flatbuffers (from onnxruntime==1.17.0->-r a.txt (line 9))
Downloading flatbuffers-24.3.25-py2.py3-none-any.whl.metadata (850 bytes)
Collecting protobuf (from onnxruntime==1.17.0->-r a.txt (line 9))
Downloading protobuf-5.28.3-cp38-abi3-manylinux2014_x86_64.whl.metadata (592 bytes)
Collecting sympy (from onnxruntime==1.17.0->-r a.txt (line 9))
Downloading sympy-1.13.3-py3-none-any.whl.metadata (12 kB)
Collecting filelock (from torch==2.2.0->-r a.txt (line 12))
Downloading filelock-3.16.1-py3-none-any.whl.metadata (2.9 kB)
Collecting typing-extensions>=4.8.0 (from torch==2.2.0->-r a.txt (line 12))
Downloading typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting networkx (from torch==2.2.0->-r a.txt (line 12))
Downloading networkx-3.4.2-py3-none-any.whl.metadata (6.3 kB)
Collecting jinja2 (from torch==2.2.0->-r a.txt (line 12))
Downloading jinja2-3.1.4-py3-none-any.whl.metadata (2.6 kB)
Collecting fsspec (from torch==2.2.0->-r a.txt (line 12))
Downloading fsspec-2024.10.0-py3-none-any.whl.metadata (11 kB)
Collecting huggingface-hub<1.0,>=0.19.3 (from transformers==4.38.1->-r a.txt (line 13))
Downloading huggingface_hub-0.26.2-py3-none-any.whl.metadata (13 kB)
Collecting pyyaml>=5.1 (from transformers==4.38.1->-r a.txt (line 13))
Downloading PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (2.1 kB)
Collecting regex!=2019.12.17 (from transformers==4.38.1->-r a.txt (line 13))
Downloading regex-2024.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.5/40.5 kB 5.1 MB/s eta 0:00:00
Collecting requests (from transformers==4.38.1->-r a.txt (line 13))
Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting tokenizers<0.19,>=0.14 (from transformers==4.38.1->-r a.txt (line 13))
Downloading tokenizers-0.15.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.7 kB)
Collecting safetensors>=0.4.1 (from transformers==4.38.1->-r a.txt (line 13))
Downloading safetensors-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.8 kB)
Collecting tqdm>=4.27 (from transformers==4.38.1->-r a.txt (line 13))
Downloading tqdm-4.66.6-py3-none-any.whl.metadata (57 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.6/57.6 kB 5.6 MB/s eta 0:00:00
Requirement already satisfied: cffi>=1.12 in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from cryptography>=3.2.1->oracledb==2.2.0->-r a.txt (line 6)) (1.15.1)
Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas==2.1.1->-r a.txt (line 2))
Downloading six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime==1.17.0->-r a.txt (line 9))
Downloading humanfriendly-10.0-py2.py3-none-any.whl.metadata (9.2 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch==2.2.0->-r a.txt (line 12))
Downloading MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.0 kB)
Collecting charset-normalizer<4,>=2 (from requests->transformers==4.38.1->-r a.txt (line 13))
Downloading charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests->transformers==4.38.1->-r a.txt (line 13))
Downloading idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests->transformers==4.38.1->-r a.txt (line 13))
Downloading urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests->transformers==4.38.1->-r a.txt (line 13))
Downloading certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
Collecting mpmath<1.4,>=1.1.0 (from sympy->onnxruntime==1.17.0->-r a.txt (line 9))
Downloading https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 5.7 MB/s eta 0:00:00
Requirement already satisfied: pycparser in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from cffi>=1.12->cryptography>=3.2.1->oracledb==2.2.0->-r a.txt (line 6)) (2.21)
Downloading pandas-2.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 10.2 MB/s eta 0:00:00
Downloading setuptools-68.0.0-py3-none-any.whl (804 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 804.0/804.0 kB 11.6 MB/s eta 0:00:00
Downloading scipy-1.12.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (37.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 37.8/37.8 MB 7.4 MB/s eta 0:00:00
Downloading matplotlib-3.8.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.6/11.6 MB 10.5 MB/s eta 0:00:00
Downloading scikit_learn-1.4.1.post1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 9.8 MB/s eta 0:00:00
Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 9.5 MB/s eta 0:00:00
Downloading onnxruntime-1.17.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.8 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.8/6.8 MB 9.1 MB/s eta 0:00:00
Downloading onnxruntime_extensions-0.10.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.0/7.0 MB 11.2 MB/s eta 0:00:00
Downloading onnx-1.16.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (15.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.9/15.9 MB 9.3 MB/s eta 0:00:00
Downloading transformers-4.38.1-py3-none-any.whl (8.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.5/8.5 MB 10.4 MB/s eta 0:00:00
Downloading sentencepiece-0.2.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.3/1.3 MB 11.9 MB/s eta 0:00:00
Downloading contourpy-1.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (320 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 320.5/320.5 kB 11.5 MB/s eta 0:00:00
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.54.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.9 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 7.0 MB/s eta 0:00:00
Downloading huggingface_hub-0.26.2-py3-none-any.whl (447 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 447.5/447.5 kB 12.7 MB/s eta 0:00:00
Downloading fsspec-2024.10.0-py3-none-any.whl (179 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 179.6/179.6 kB 17.7 MB/s eta 0:00:00
Downloading joblib-1.4.2-py3-none-any.whl (301 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 301.8/301.8 kB 14.1 MB/s eta 0:00:00
Downloading kiwisolver-1.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 8.9 MB/s eta 0:00:00
Downloading pillow-11.0.0-cp312-cp312-manylinux_2_28_x86_64.whl (4.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 11.0 MB/s eta 0:00:00
Downloading protobuf-5.28.3-cp38-abi3-manylinux2014_x86_64.whl (316 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 316.6/316.6 kB 11.7 MB/s eta 0:00:00
Downloading pyparsing-3.2.0-py3-none-any.whl (106 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 106.9/106.9 kB 17.4 MB/s eta 0:00:00
Downloading python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 229.9/229.9 kB 13.3 MB/s eta 0:00:00
Downloading pytz-2024.2-py2.py3-none-any.whl (508 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 508.0/508.0 kB 11.5 MB/s eta 0:00:00
Downloading PyYAML-6.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (767 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 767.5/767.5 kB 6.9 MB/s eta 0:00:00
Downloading regex-2024.9.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (797 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 797.0/797.0 kB 7.0 MB/s eta 0:00:00
Downloading safetensors-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (434 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 434.8/434.8 kB 13.7 MB/s eta 0:00:00
Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
Downloading tokenizers-0.15.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.6/3.6 MB 9.5 MB/s eta 0:00:00
Downloading tqdm-4.66.6-py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.3/78.3 kB 6.0 MB/s eta 0:00:00
Downloading typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Downloading tzdata-2024.2-py2.py3-none-any.whl (346 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 346.6/346.6 kB 12.3 MB/s eta 0:00:00
Downloading coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.0/46.0 kB 818.7 kB/s eta 0:00:00
Downloading filelock-3.16.1-py3-none-any.whl (16 kB)
Downloading flatbuffers-24.3.25-py2.py3-none-any.whl (26 kB)
Downloading jinja2-3.1.4-py3-none-any.whl (133 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 16.6 MB/s eta 0:00:00
Downloading networkx-3.4.2-py3-none-any.whl (1.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 8.3 MB/s eta 0:00:00
Downloading requests-2.32.3-py3-none-any.whl (64 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 64.9/64.9 kB 6.6 MB/s eta 0:00:00
Downloading sympy-1.13.3-py3-none-any.whl (6.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 MB 11.4 MB/s eta 0:00:00
Downloading certifi-2024.8.30-py3-none-any.whl (167 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 167.3/167.3 kB 18.6 MB/s eta 0:00:00
Downloading charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (143 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.8/143.8 kB 18.8 MB/s eta 0:00:00
Downloading humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 86.8/86.8 kB 13.2 MB/s eta 0:00:00
Downloading idna-3.10-py3-none-any.whl (70 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 70.4/70.4 kB 9.6 MB/s eta 0:00:00
Downloading MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23 kB)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading urllib3-2.2.3-py3-none-any.whl (126 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 126.3/126.3 kB 2.5 MB/s eta 0:00:00
Installing collected packages: sentencepiece, pytz, onnxruntime-extensions, mpmath, flatbuffers, urllib3, tzdata, typing-extensions, tqdm, threadpoolctl, sympy, six, setuptools, safetensors, regex, pyyaml, pyparsing, protobuf, pillow, packaging, numpy, networkx, MarkupSafe, kiwisolver, joblib, idna, humanfriendly, fsspec, fonttools, filelock, cycler, charset-normalizer, certifi, scipy, requests, python-dateutil, onnx, jinja2, contourpy, coloredlogs, torch, scikit-learn, pandas, onnxruntime, matplotlib, huggingface-hub, tokenizers, transformers
Successfully installed MarkupSafe-3.0.2 certifi-2024.8.30 charset-normalizer-3.4.0 coloredlogs-15.0.1 contourpy-1.3.0 cycler-0.12.1 filelock-3.16.1 flatbuffers-24.3.25 fonttools-4.54.1 fsspec-2024.10.0 huggingface-hub-0.26.2 humanfriendly-10.0 idna-3.10 jinja2-3.1.4 joblib-1.4.2 kiwisolver-1.4.7 matplotlib-3.8.4 mpmath-1.3.0 networkx-3.4.2 numpy-1.26.4 onnx-1.16.0 onnxruntime-1.17.0 onnxruntime-extensions-0.10.1 packaging-24.1 pandas-2.1.1 pillow-11.0.0 protobuf-5.28.3 pyparsing-3.2.0 python-dateutil-2.9.0.post0 pytz-2024.2 pyyaml-6.0.2 regex-2024.9.11 requests-2.32.3 safetensors-0.4.5 scikit-learn-1.4.1.post1 scipy-1.12.0 sentencepiece-0.2.0 setuptools-68.0.0 six-1.16.0 sympy-1.13.3 threadpoolctl-3.5.0 tokenizers-0.15.2 torch-2.2.0+cpu tqdm-4.66.6 transformers-4.38.1 typing-extensions-4.12.2 tzdata-2024.2 urllib3-2.2.3
[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
패키지가 설치가 잘 되었는지 테스트
설치가 잘 되었을 때
에러없이 다음 명령어창으로 넘어갑니다.
$ python3
Python 3.12.3 (main, Jul 3 2024, 08:35:38) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oracledb
>>>
설치가 잘 안되었을 때
에러가 발생합니다.
$ python3
Python 3.12.3 (main, Jul 3 2024, 08:35:38) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oracledb
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/tmp/1662014490/python/dist/oracle.python/generic/python/lib/python3.12/site-packages/oracledb/__init__.py", line 174, in <module>
File "/tmp/1662014490/python/dist/oracle.python/generic/python/lib/python3.12/site-packages/oracledb/connection.py", line 45, in <module>
File "src/oracledb/impl/thin/crypto.pyx", line 33, in init oracledb.thin_impl
File "/tmp/1662014490/python/dist/oracle.python/generic/python/lib/python3.12/site-packages/cryptography/x509/__init__.py", line 7, in <module>
Oracle Machine Learning for Python integrates Python with Oracle Database.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/1662014490/python/dist/oracle.python/generic/python/lib/python3.12/site-packages/cryptography/x509/certificate_transparency.py", line 11, in <module>
RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.
>>>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
위의 에러를 해결하는 방법은 아래와 같습니다(Trouble Shooting)
RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.
위의 메세지가 발생하였는데 cryptography라는 패키지가 예전패키지여서 나는 에러같고, pip로 최신패키지로 업데이터해주면 해결됩니다.
$ pip install -U cryptography
Requirement already satisfied: cryptography in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (42.0.7)
Collecting cryptography
Downloading cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl.metadata (5.4 kB)
Requirement already satisfied: cffi>=1.12 in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from cryptography) (1.15.1)
Requirement already satisfied: pycparser in /opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages (from cffi>=1.12->cryptography) (2.21)
Downloading cryptography-43.0.3-cp39-abi3-manylinux_2_28_x86_64.whl (4.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.0/4.0 MB 10.5 MB/s eta 0:00:00
Installing collected packages: cryptography
Attempting uninstall: cryptography
Found existing installation: cryptography 42.0.7
Uninstalling cryptography-42.0.7:
Successfully uninstalled cryptography-42.0.7
Successfully installed cryptography-43.0.3
[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
$ python3
Python 3.12.3 (main, Jul 3 2024, 08:35:38) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oracledb
>>>
----------------------------------------------------------------------------------------------------------------------------------------------------------------
5.client파일 ftp전송 후 압축풀고 설치
oml4py-client-linux-x86_64-2.0.zip 파일을 압축풀고 설치를 진행합니다.
$ unzip oml4py-client-linux-x86_64-2.0.zip
Archive: oml4py-client-linux-x86_64-2.0.zip
inflating: client/client.pl
inflating: client/OML4PInstallShared.pm
inflating: client/oml-2.0-cp312-cp312-linux_x86_64.whl
extracting: client/oml4py.ver
$ ls
a.txt client oml4py-client-linux-x86_64-2.0.zip
설치
$ perl -Iclient client/client.pl
Oracle Machine Learning for Python 2.0 Client.
Copyright (c) 2018, 2024 Oracle and/or its affiliates. All rights reserved.
Checking platform .................. Pass
Checking Python .................... Pass
Checking dependencies .............. /home/oracle/check_deps.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
from pkg_resources import WorkingSet, VersionConflict, DistributionNotFound
Pass
Checking OML4P version ............. Pass
Current configuration
Python Version ................... 3.12.3
PYTHONHOME ....................... /opt/oracle/product/23ai/dbhomeFree/python
Existing OML4P module version .... None
Operation ........................ Install/Upgrade
Proceed? [yes]yes
Processing ./client/oml-2.0-cp312-cp312-linux_x86_64.whl
Installing collected packages: oml
Successfully installed oml-2.0
[notice] A new release of pip is available: 24.0 -> 24.3.1
[notice] To update, run: pip install --upgrade pip
Done
설치 확인법
에러 발생안하고 잘보이면 설치가 완료된 것입니다.
$ python3
Python 3.12.3 (main, Jul 3 2024, 08:35:38) [GCC 8.5.0 20210514 (Red Hat 8.5.0-18.0.6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import oml
>>> oml.__path__
['/opt/oracle/product/23ai/dbhomeFree/python/lib/python3.12/site-packages/oml']
다음은 23ai OML4Y server 구성법에 대해서 설치하고 정리해보도록 하겠습니다.
'Oracle > 설치' 카테고리의 다른 글
Oracle 23ai에 OML4Y Server 설치하기 (3) | 2024.11.09 |
---|---|
[23ai free]를 rpm으로 설치해보기 (0) | 2024.10.28 |
DB 설치 전 OS 구성 시 각각 설정값의 의미 (0) | 2020.12.01 |
Oracle 19c Silent Single Install (CentOS 7.8 64bit) (0) | 2020.11.17 |
OEL 8.1 19c DB runinstall 시 나는 패키지 관련 에러 (0) | 2020.06.04 |
댓글