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/ssl.py", 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/clidriver.py", line 17, in <module>
import botocore.session
File "/opt/freeware/lib/python3.9/site-packages/botocore/session.py", line 26, in <module>
import botocore.client
File "/opt/freeware/lib/python3.9/site-packages/botocore/client.py", line 15, in <module>
from botocore import waiter, xform_name
File "/opt/freeware/lib/python3.9/site-packages/botocore/waiter.py", line 18, in <module>
from botocore.docs.docstring import WaiterDocstring
File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/__init__.py", line 15, in <module>
from botocore.docs.service import ServiceDocumenter
File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/service.py", line 14, in <module>
from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/client.py", line 17, in <module>
from botocore.docs.example import ResponseExampleDocumenter
File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/example.py", line 13, in <module>
from botocore.docs.shape import ShapeDocumenter
File "/opt/freeware/lib/python3.9/site-packages/botocore/docs/shape.py", line 19, in <module>
from botocore.utils import is_json_value_header
File "/opt/freeware/lib/python3.9/site-packages/botocore/utils.py", line 37, in <module>
import botocore.httpsession
File "/opt/freeware/lib/python3.9/site-packages/botocore/httpsession.py", 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/ssl_.py)
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
------------------------------
#AIXOpenSource