Greeting of the day to all..
I would like to address few queries as mentioned in the below.
python 2.7 code is running fine on RHEL 7.9,we are migrating to python3 from Python2 using 2to3 on RHEL 7.9.
After migrating, When we run our products in python 3.6,we are facing some modules are not imported error.
Example 1:
from IN import AF_INET6
ModuleNotFoundError: No module named 'IN'
In 2.7 IN modules coming from python-libs package,but in python3-libs doesnt find the IN module.
/usr/lib64/python2.7/plat-linux2/IN.py is avaialbe in python-libs-2.7.5-89.el7.x86_64 ,but it is not avilable in python3-libs.
[root@opt]# rpm -ql python-libs | grep -i IN.py
/usr/lib64/python2.7/plat-linux2/IN.py
/usr/lib64/python2.7/plat-linux2/IN.pyc
/usr/lib64/python2.7/plat-linux2/IN.pyo
[root@ opt]# rpm -ql python3-libs | grep -i IN.py
[root@ opt]#
Example2:
from yum import YumBase
ModuleNotFoundError: No module named 'yum'
In RHEL 7.9 python 2.7 /usr/lib/python2.7/site-packages/yum is avaialbe , but in RHEL 7.9 with python3 it is not available.python3 is require python3-dnf but this is avaialbe from RHEL 8,doesnt have in RHEL 7.9.
Kindly help, how to overcome this kind of issue, it would be more helpful for us to move forward.
We are using 2to3 migration tool for converting py2 to py3.
|