AIX Open Source

 View Only
  • 1.  installing pip module 'requests' on AIX V7.2

    Posted Tue July 16, 2024 09:15 AM

    hello,

    we were asked to install 'requests' pip module in our Python 3.7.9 / AIX 7200-05-07-2346 LPAR. So that, we executed: $ sudo python -m pip install requests.

    Because it installed three other modules as dependencies, we got: charset-normalizer-3.3.2 idna-3.7 requests-2.31.0 urllib3-2.0.7

    However, while executing our python program we get this error:

    ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2u  20 Dec 2019'. S
    ee: https://github.com/urllib3/urllib3/issues/2168

    Because our openssl version currently installed is openssl-1.0.2n-1.ppc, does it mean we should upgrade to OpenSSL 1.1.1+ ? 
    Is it possible to install any other combination of pip modules that do not require to install a newer openssl version while being compatible with Python 3.7.9?

    thanks and regards
    Jose



    ------------------------------
    Antonio Gallego
    ------------------------------


  • 2.  RE: installing pip module 'requests' on AIX V7.2

    Posted Wed July 17, 2024 02:31 AM

    Morning all,

    just wanted to add that we also tried an older 'requests' module version (2.29.0 instead of 2.31.0) which provided us with urllib3 1.26.19, lower than 2.0 and did not complain about OpenSSL versions:

    -bash-5.0$ sudo python -m pip install requests==2.29.0
    Collecting requests==2.29.0
      Downloading requests-2.29.0-py3-none-any.whl (62 kB)
         |################################| 62 kB 397 kB/s
    Collecting charset-normalizer<4,>=2
      Using cached charset_normalizer-3.3.2-py3-none-any.whl (48 kB)
    Collecting certifi>=2017.4.17
      Using cached certifi-2024.7.4-py3-none-any.whl (162 kB)
    Collecting idna<4,>=2.5
      Using cached idna-3.7-py3-none-any.whl (66 kB)
    Collecting urllib3<1.27,>=1.21.1
      Downloading urllib3-1.26.19-py2.py3-none-any.whl (143 kB)
         |################################| 143 kB 27.5 MB/s
    Installing collected packages: charset-normalizer, certifi, idna, urllib3, requests
      WARNING: The script normalizer is installed in '/opt/freeware/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
    Successfully installed certifi-2024.7.4 charset-normalizer-3.3.2 idna-3.7 requests-2.29.0 urllib3-1.26.19
    WARNING: You are using pip version 20.1.1; however, version 24.0 is available.
    You should consider upgrading via the '/usr/bin/python -m pip install --upgrade pip' command.

    So it seems that the openssl dependency does not exist in lower versions.

    Anyyway, is there any compatibility matrix available between pip modules and python versions?

    Thanks and regards

    Jose



    ------------------------------
    Antonio Gallego
    ------------------------------



  • 3.  RE: installing pip module 'requests' on AIX V7.2

    IBM Champion
    Posted Wed July 24, 2024 06:10 AM

    Python 3.7.9 has been released (&EOL) in August 2020, while OpenSSL 1.0.2 has been out of support since January 1st, 2020.

    They're both very old, and trying to install a pip package without specifying a version from around the same time is likely to either fail, or fail with the "bonus" of bricking your pip/python installation.

    Since you're on AIX 7.2, you should consider cloning the LPAR and upgrading the python to 3.9.19.

    https://www.openssl.org/news/vulnerabilities-1.0.2.html



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------