AIX Open Source

 View Only
  • 1.  issue with aws cli

    Posted Thu May 23, 2024 12:31 PM

    We have updated the python using following setup 

    We did DNF  install with the tar file offline to  3.9.16 version. then we installed aws using whl file .

    But our aws cli is not working and throwing following error :

    root@server:/opt/freeware/lib/python3.9/site-packages/urllib3/util # python
    Python 3.9.16 (main, Jun 28 2023, 12:45:03) 
    [GCC 8.3.0] on aix
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import ssl
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/opt/freeware/lib64/python3.9/", line 99, in <module>
        import _ssl             # if we can't import it, let the error propagate
    ModuleNotFoundError: No module named '_ssl'



    root@server:/opt/freeware/lib/python3.9/site-packages/urllib3/util # aws
    Traceback (most recent call last):
      File "/usr/bin/aws", line 19, in <module>
        import awscli.clidriver
      File "/opt/freeware/lib/python3.9/site-packages/awscli/", line 17, in <module>
        import botocore.session
      File "/opt/freeware/lib/python3.9/site-packages/botocore/", line 26, in <module>
        import botocore.client
      File "/opt/freeware/lib/python3.9/site-packages/botocore/", line 15, in <module>
        from botocore import waiter, xform_name
      File "/opt/freeware/lib/python3.9/site-packages/botocore/", line 18, in <module>
        from import WaiterDocstring
      File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/", line 15, in <module>
        from import ServiceDocumenter
      File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/", line 14, in <module>
        from import ClientDocumenter, ClientExceptionsDocumenter
      File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/", line 17, in <module>
        from import ResponseExampleDocumenter
      File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/", line 13, in <module>
        from import ShapeDocumenter
      File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/", line 19, in <module>
        from botocore.utils import is_json_value_header
      File "/opt/freeware/lib/python3.9/site-packages/botocore/", line 37, in <module>
        import botocore.httpsession
      File "/opt/freeware/lib/python3.9/site-packages/botocore/", line 22, in <module>
        from urllib3.util.ssl_ import (
    ImportError: cannot import name 'ssl' from 'urllib3.util.ssl_' (/opt/freeware/lib/python3.9/site-packages/urllib3/util/
    root@ophdatastagesr1:/opt/freeware/lib/python3.9/site-packages/urllib3/util # 

    it appears ssl is not getting imported , same step is working in our lower environments.

    any comments please help .

    Iqbal Singh

  • 2.  RE: issue with aws cli

    Posted Fri May 24, 2024 02:17 AM

    Hi All,

    Can someone please suggest as soon as possible.We installed DNF offline by using tar file package available at AIX tool box site. Then python was in built with that DNF package and version is 3.9.16. Somehow this installation is broken and Python is not able to identify SSL. Please help us.



    Priya Soni

  • 3.  RE: issue with aws cli

    Posted Fri May 24, 2024 03:51 AM

    The main python3.9 rpm inside the dnf bundle is a trimmed down version (to reduce the dnf_bundle size). So it is not compiled with ssl support. You need to update it to python3.9-3.9.16-1 or higher version in Toolbox. 

    Ayappan P

  • 4.  RE: issue with aws cli

    Posted Fri May 24, 2024 04:02 AM

    Thanks, This Toolbox URL is blocked in our server as we are in secured environment . ("" href="" rel="noreferrer noopener" target="_blank" class="fui-Link ___1rxvrpe f2hkw1w f3rmtva f1ewtqcl fyind8e f1k6fduh f1w7gpdv fk6fouc fjoy568 figsok6 f1hu3pq6 f11qmguv f19f4twv f1tyq0we f1g0x7ka fhxju0i f1qch9an f1cnd47f fqv5qza f1vmzxwi f1o700av f13mvf36 f1cmlufx f9n3di6 f1ids18y f1tx3yz7 f1deo86v f1eh06m1 f1iescvh fhgqx19 f1olyrje f1p93eir f1nev41a f1h8hb77 f1lqvz6u f10aw75t fsle3fq f17ae5zn" title="">")

    That is the reason we could not install DNF and python on fly directly accessing this URL from AIX servers.

    We had below SSL installed in our servers.

    Can you please suggest us further if there is anyway to upgrade Python offline and if in case SSL is an issue or we need to upgrade that as well.

    root@servernode1:/home/root # lslpp -L | grep openssl
      openssl.base     C     F    Open Secure Socket Layer
      openssl.license    C     F    Open Secure Socket License    C     F    Open Secure Socket Layer
      openssl                   1.0.2u-1    C     R    Secure Sockets Layer and
      openssl-devel             1.0.2n-1    C     R    Secure Sockets Layer and
      openssl-doc               1.0.2n-1    C     R    OpenSSL miscellaneous files

    Iqbal Singh

  • 5.  RE: issue with aws cli

    Posted Fri May 24, 2024 04:26 AM

    You have to manually download the rpms from Toolbox and install it.
    It again will have dependencies which also needs to downloaded and installed along with it. 
    Also you have openssl rpm installed. Remove it , as Toolbox packages only works with openssl lpp fileset from IBM.

    Ayappan P

  • 6.  RE: issue with aws cli

    Posted Tue May 28, 2024 10:51 AM

    Download python ssl module from "ssl · PyPI"

    and install it offline using this command "python3 -m pip install ./downloads/SomeProject-1.0.4.tar.gz"

    source: Installing Packages - Python Packaging User Guide

    Priyesh Manwatkar (Senior Manager)
    Sr. Tech Analyst-EA Design Solutioning
    Mumbai, India.