Loading...

Installing Python on an IBM i Computer

To use Python SDK to run CommCell operations, you must install the Python software on the IBM i computer.

Prerequisites

The IBM i computer must have operating system version V7R1 or later.

Procedure

  1. Python requires Portable Application Solutions Environment (PASE) to be installed on the IBM i computer, which is available through product numbers 5770SS1 option 33 and 5733SC1.

    It is recommended by IBM that you get the latest Program Temporary Fixes (PTFs) for product number 5733SC1. For more information, go to the IBM i OpenSSH & OpenSSL Community web page and search for 5733-SC1 PTFs.

  2. Verify that the latest cumulative PTFs are installed on the IBM i computer.
  3. Install Python 3.6 on the IBM i computer by using the new RPM method provided by IBM because the open source product 5733OPS is no longer available for download. For more information about the RPM method, go to the IBM i Open Source web page.

    Following are some of the installation commands:

    • All software provided by the RPMs are installed in the /QOpenSys/pkgs prefixed directory. To use the software, you can fully qualify the path to the program, or you can add /QOpenSys/pkgs/bin to your PATH by using the following command:

      PATH=/QOpenSys/pkgs/bin:$PATH
      export PATH

    • Install Python 3 and other useful Python packages.

      yum install python3-pip python3-ibm_db python3-itoolkit

    • Install the Python 3 Machine Learning packages.

      yum install python3-numpy python3-pandas python3-scikit-learn python3-scipy

    • Install node.js.

      yum install nodejs10

    • Install the GCC and development tools.

      yum group install "Development tools"

  4. Run the following command to test Python installation.

    python3 –-version

  5. Install the dependent package pycryptodomex by using the following command:

    python3 -m pip install pycryptodomex

Result

The Python software is installed on the IBM i computer along with the dependent packages.

What to Do Next

Install the Python SDK on the IBM i computer:

  1. Install the Developer SDK - Python package on the Linux proxy computer. See Preinstallation Checklist for Developer SDK - Python on UNIX.

    When the Python SDK installation is complete, the installation program creates the Software_Installation_Directory/pythonsdk directory on the proxy computer.

  2. Run the following commands to perform an SCP or FTP operation on the entire Python SDK from the proxy computer to the IBM i computer.
    1. Send the Python SDK from the proxy computer:

      scp -r Software_Installation_Directory/pythonsdk/* qsecofr@IBMi_Host_Name:PythonSDK_Path_On_IBM_i

    2. Get the Python SDK on the IBM i computer:

      scp -r root@Software_Installation_Directory/pythonsdk/* PythonSDK_Path_On_IBM_i

  3. Go to QSH from 5250 command line or perform an SSH operation to the IBM i computer for package installation. Run the following commands from the command line:

    cd PythonSDK_Path_On_IBM_i                     /* Change current directory to Python SDK directory on IBM i computer */

    python3 setup.py install                         /* Actual install */

    cd cvcmd                                       /* Change current directory to commands directory */

  4. Test the Python SDK package to perform CommCell operations from the IBM i shell command line.

Last modified: 5/12/2020 10:03:15 AM