AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
  • 1.  Installing pip on AIX

    Posted Wed June 22, 2022 03:21 AM
    Hi Sir/Ma'am, 

    I am new to AIX & I was tasked to install python because it is a pre-requisite of datadog application, a monitoring tool used by our company. Per checking, I was able to install python3.7 & per what I was able to read, pip should already be included on Python 3.4 & up. But when when I am checking it, pip is not included on what I have installed. Already looked throughout the net & I am having a hard time looking for a solution for AIX.

    Asking for your kind assistance please, thank you

    "pip is the preferred installer program. Starting with Python 3.4, it is included by default with the Python binary installers."

    bash-4.3# rpm -qa | grep python
    rpm-python3-4.15.1-32_1.ppc
    python3-libdnf-0.39.1-32_2.ppc
    python3-gpgme-1.13.1-32_1.ppc
    python3-dnf-4.2.17-32_2.noarch
    python3-librepo-1.11.0-32_1.ppc
    python3-3.7.9-0.ppc
    python3-hawkey-0.39.1-32_2.ppc
    python3-libcomps-0.1.11-32_1.ppc

    bash-4.3# oslevel -s
    7200-04-03-2038

    bash-4.3# pwd
    /opt/freeware/bin
    bash-4.3# python --version
    bash: python: command not found
    bash-4.3# python3 --version
    bash: python3: command not found
    bash-4.3# ./python --version
    bash: ./python: A file or directory in the path name does not exist.
    bash-4.3# ./python3 --version
    Python 3.7.9

    bash-4.3# python -m pip --version
    bash: python: command not found
    bash-4.3# pwd
    /opt/freeware/bin
    bash-4.3# python3 -m pip --version
    bash: python3: command not found
    bash-4.3# ./python -m pip --version
    bash: ./python: A file or directory in the path name does not exist.
    bash-4.3# ./python3 -m pip --version
    /opt/freeware/bin/python3: No module named pip
    bash-4.3#

    bash-4.3# rpm -ivh python-pip-10.0.1-1.aix6.1.noarch.rpm
    error: Failed dependencies:
    python-setuptools >= 0.9.8-2 is needed by python-pip-10.0.1-1.noarch
    python is needed by python-pip-10.0.1-1.noarch
    /opt/freeware/bin/python is needed by python-pip-10.0.1-1.noarch
    /opt/freeware/bin/python_64 is needed by python-pip-10.0.1-1.noarch
    bash-4.3#


    ------------------------------
    Dominador Jr Murao
    ------------------------------


  • 2.  RE: Installing pip on AIX

    Posted Thu June 23, 2022 12:47 AM
    Hi 

    It is included in the python3 package and this location here:

    $ rpm -qf /opt/freeware/lib/python3.7/site-packages/pip
    python3-3.7.12-1.ppc

    And in my case works:

    $  /opt/freeware/bin/python3 -m pip --version
    pip 20.1.1 from /opt/freeware/lib/python3.7/site-packages/pip (python 3.7)


    ------------------------------
    Oliver Stadler
    ------------------------------



  • 3.  RE: Installing pip on AIX

    Posted Thu June 23, 2022 02:18 AM
    Hi Oliver,

    Thanks for the reply.

    Per checking, there is no pip on site-packages directory; tried also the rpm -qf command you have given; see results below:

    bash-4.3# pwd
    /opt/freeware/lib/python3.7/site-packages
    bash-4.3# ls -ltr
    total 32
    -rw-r--r-- 1 root system 119 Mar 30 2021 README.txt
    lrwxrwxrwx 1 root system 59 Jun 21 11:03 rpm -> ../../../../..//usr/opt/rpm/lib/python3.7/site-packages/rpm
    drwxr-xr-x 2 root system 4096 Jun 21 11:03 libdnf
    drwxr-xr-x 2 root system 256 Jun 21 11:03 hawkey
    drwxr-xr-x 2 root system 256 Jun 21 11:03 libcomps
    drwxr-xr-x 4 root system 4096 Jun 21 11:03 gpg
    drwxr-xr-x 3 root system 256 Jun 21 11:03 dnf-plugins
    drwxr-xr-x 9 root system 4096 Jun 21 11:03 dnf
    drwxr-xr-x 2 root system 256 Jun 21 11:03 librepo
    bash-4.3#
    bash-4.3# rpm -qf /opt/freeware/lib/python3.7/site-packages/pip
    error: file /opt/freeware/lib/python3.7/site-packages/pip: A file or directory in the path name does not exist.
    bash-4.3#

    ------------------------------
    Dominador Jr Murao
    ------------------------------



  • 4.  RE: Installing pip on AIX

    Posted Thu June 23, 2022 02:41 AM
    Hi Dominador

    In your output I see that your package version of pyhton3 is lower than mine.

    You have python3-3.7.9-0.ppc while I have python3-3.7.12-1.ppc. Can you try to update to the latest one?




    ------------------------------
    Oliver Stadler
    ------------------------------



  • 5.  RE: Installing pip on AIX

    Posted Thu June 23, 2022 05:26 AM
    Hi Oliver,

    You have python3-3.7.9-0.ppc while I have python3-3.7.12-1.ppc. Can you try to update to the latest one?
    ->so does it mean that not all Python version 3.4 & up already has pip included?

    We tried to download & install Python 3.9.1 & it seems that pip is included:

    bash-4.3# ls -ltr
    total 17408
    -rwxr-xr-x 1 bin bin 18541 Oct 21 2019 smtpd.py
    -rwxr-xr-x 1 bin bin 78 Oct 21 2019 pydoc
    -rwxr-xr-x 1 bin bin 93 Oct 21 2019 idle
    -rwxr-xr-x 1 bin bin 95 Oct 21 2019 2to3
    -rwxr-xr-x 1 bin bin 3028159 Oct 21 2019 python2.7
    -rwxr-xr-x 1 bin bin 1681 Oct 21 2019 python2.7-config
    -rwxr-xr-x 1 bin bin 5574796 Jan 04 2021 python3.9
    -rwxr-xr-x 1 bin bin 2990 Jan 04 2021 python3.9-config
    -rwxr-xr-x 1 bin bin 78 Jan 04 2021 pydoc3.9
    -rwxr-xr-x 1 bin bin 93 Jan 04 2021 idle3.9
    -rwxr-xr-x 1 bin bin 95 Jan 04 2021 2to3-3.9
    -rwxr-xr-x 1 bin bin 232 Jan 04 2021 easy_install-3.9
    -rwxr-xr-x 1 bin bin 223 Jan 04 2021 pip3.9
    -rwxr-xr-x 1 bin bin 223 Jan 04 2021 pip3
    lrwxrwxrwx 1 root system 7 Jun 10 16:22 idle3 -> idle3.9
    lrwxrwxrwx 1 root system 16 Jun 10 16:22 python3-config -> python3.9-config
    lrwxrwxrwx 1 root system 9 Jun 10 16:22 python3 -> python3.9
    lrwxrwxrwx 1 root system 8 Jun 10 16:22 pydoc3 -> pydoc3.9
    lrwxrwxrwx 1 root system 16 Jun 13 11:54 python2-config -> python2.7-config
    lrwxrwxrwx 1 root system 9 Jun 13 11:54 python2 -> python2.7
    lrwxrwxrwx 1 root system 14 Jun 13 11:54 python-config -> python2-config
    lrwxrwxrwx 1 root system 7 Jun 13 11:54 python -> python2
    -rw-r--r-- 1 root system 233840 Jun 15 13:15 datadog_checks_base-25.4.1-py2.py3-none-any.whl
    drwxr-xr-x 5 root system 256 Jun 23 11:35 tutorial_env
    bash-4.3# pwd
    /opt/bin


    bash-4.3# python3 --version
    Python 3.9.1
    bash-4.3# python3 -m pip --version
    pip 20.2.3 from /opt/lib/python3.9/site-packages/pip (python 3.9)
    bash-4.3#

    ------------------------------
    Dominador Jr Murao
    ------------------------------