A Packaging the Python Libraries
To package the Python libraries, follow these steps:
- The following sample installation steps are performed on Oracle Enterprise Linux 7.x.
- Ensure that Oracle Enterprise Linux 7.x is installed.
- Verify these libraries using the yum list as shown in the following
command:
yum list installed | grep libffi
Figure A-1 Python Libraries Verification
Note:
If any lib is not installed, then install it using the above command one-by-one. - Install the following libraries using the following commands:
yum install libffi.i686
yum install libffi.x86_64
yum install libffi-devel.i686
yum install libffi-devel.x86_64
- Ensure that the version of Python is 3.8.3 using the following
commands:
export http_proxy=www-proxy-idc.in.oracle.com:80
exporthttps_proxy=www-proxy-idc.in.oracle.com:80
wget https://www.python.org/ftp/python/3.9.4/Python-3.9.4.tgz tar xzf Python-3.9.4.tgz
cd Python-3.9.4
./configure--prefix=$HOME/Python-3.9.4 --enable-optimizations -- without-ensurepip
make install
- Add
$HOME/Python-3.9.4/bin
in PATH in the.profile
file. - After Python installation, execute the following command to install the setup
tools:
- Verify if pip3 is installed using the following command:
Run pip3
- If pip3 is not installed, then install it using the following
command:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py python3 get-pip.py
- Re-verify by executing: pip3 command (step a).
- Verify if pip3 is installed using the following command:
- Install the Python libraries using the following commands:
pip3 install numpy==1.19.4 pip3 install pandas==1.2.4 pip3 install scikit-learn==0.24.2 pip3 install scipy==1.6.3 pip3 install seaborn==0.10.1 pip3 install statsmodels==0.12.2 pip3 install matplotlib==3.2.2 pip3 install imbalanced-learn==0.7.0 pip3 install cx_oracle==8.1.0 pip3 install sqlalchemy==1.3.18 pip3 install pmdarima==1.8.2
- Python set up tools 57.0.0 wheel 0.36.2
python3 -m pip3 install --user --upgrade setuptools==57.0.0 wheel==0.36.2
- If you face an SSL Error:
- Offline Installation of setuptools
Download setuptools wheel from the following link:
wget https://files.pythonhosted.org/packages/44/a6/7fb6e8b3f4a6051e72e4e2218889351f0ee484b 9ee17e995f5ccff780300/setuptools-50.3.0-py3-none-any.whl
pip3 install setuptools-50.1.0-py3-none-any.whl
- Offline Installation of wheel
Download wheel utility as
wget https://files.pythonhosted.org/packages/a7/00/3df031b3ecd5444d572141321537080b40c1c25 e1caa3d86cdd12e5e919c/wheel-0.35.1-py2.py3-none-any.whl
pip3 install wheel-0.35.1-py2.py3-none-any.whl
- Offline Installation of setuptools