5.2.1 Install Python across Exadata compute nodes using DCLI
Instructions for installing Python across Exadata compute nodes using DCLI.
These steps describe building and installing Python for Exdata.
-
Go to the Python website and download the Python 3.12.0 XZ compressed source tarball and untar it. The downloaded file name is
Python-3.12.0.tgz
wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz tar xvf Python-3.12.0.tgz
-
OML4Py requires the presence of the
perl-Env libffi-devel
,openssl
,openssl-devel
,tk-devel
,xz-devel
,zlib-devel
,bzip2-devel
,readline-devel
andlibuuid-devel
libraries. Install these libraries using the command:dcli -t -g nodes -l root "yum -y install perl-Env libffi-devel openssl openssl-devel tk-devel xz-devel zlib-devel bzip2-devel readline-devel libuuid-devel"
-
Set the PYTHONHOME environment on each node:
dcli -t -g nodes -l oracle "export PYTHONHOME=$ORACLE_HOME/python; export PATH=$ORACLE_HOME/python/bin$PATH; export LD_LIBRARY_PATH=$ORACLE_HOME/python/lib:$LD_LIBRARY_PATH; export PIP_REQUIRE_VIRTUALENV=false" dcli -t -g nodes -l oracle "tar xvfz $ORACLE_HOME/Python-3.12.0.tgz -C $ORACLE_HOME/python" dcli -t -g nodes -l oracle "cd $ORACLE_HOME/python; ./configure --enable-shared --prefix=$ORACLE_HOME/python" dcli -t -g nodes -l oracle "cd $ORACLE_HOME/python; make clean; make" dcli -t -g nodes -l oracle "cd $ORACLE_HOME/python; make altinstall"
-
Create a symbolic link in your
$PYTHONHOME/bin
directory. You need to link it to your Python-3.12 executable, which you can do with the following commands:dcli -t -g nodes -l oracle "cd $PYTHONHOME/bin" dcli -t -g nodes -l oracle "ln -s python3.12 python3"
-
Set environment variable
PYTHONHOME
and add it to yourPATH
, and set environment variableLD_LIBRARY_PATH
:dcli -t -g nodes -l oracle "export PYTHONHOME=$ORACLE_HOME/python" dcli -t -g nodes -l oracle "export PATH=$PYTHONHOME/bin:$PATH" dcli -t -g nodes -l oracle "export LD_LIBRARY_PATH=$PYTHONHOME/lib:$LD_LIBRARY_PATH" dcli -t -g nodes -l oracle "export PIP_REQUIRE_VIRTUALENV=false"
-
You can now start Python by running the command python3. For example:
dcli -t -g nodes -l oracle "python3"
exadb01: Python 3.12.0 (default, Feb 10 2022, 14:38:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44.0.3)] on linux Type "help", "copyright", "credits" or "license" for more information. exadb02: Python 3.12.0 (default, Feb 10 2022, 14:38:12) [GCC 4.8.5 20150623 (Red Hat 4.8.5-44.0.3)] on linux Type "help", "copyright", "credits" or "license" for more information.