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
Expand all | Collapse all

Migrating to Python 3.9 Ecosystem

  • 1.  Migrating to Python 3.9 Ecosystem

    Posted Wed July 12, 2023 12:27 PM

    Hi AIX Experts,

    I am working on migrating from python 3.7 to python 3.9 ecosystem. I have successfully installed the new rpm.rte 4.15.1.1010 using installp. I am wondering if I now need to run install_dnf.sh to link dnf to the new rpm.rte?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------


  • 2.  RE: Migrating to Python 3.9 Ecosystem

    Posted Fri July 14, 2023 10:05 AM

    Hi Ayappan / SANGAMESH,

    Can one of you please respond to my above inquiry? I have also tried to run following dnf command to install python 3.9.16 after only updating rpm.rte and found python 3.9.16 didn't replacing python 3.7 (python3 still pointing to python 3.7 under /opt/freeware/bin). Can you please help on this as well?

    dnf install python3.9-3.9.16-2.aix7.1.ppc.rpm

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 3.  RE: Migrating to Python 3.9 Ecosystem

    Posted Mon July 17, 2023 02:32 AM

    Hi Mi,

    You need to run dnf update to have default python as python3-3.9.x

    This will also update dnf and it's dependencies to python3.9.

    I think your repository is pointing to AIX Toolbox repo.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 4.  RE: Migrating to Python 3.9 Ecosystem

    Posted Mon July 17, 2023 10:39 AM

    Hi SANGAMESH,

    Thanks for the information. But our AIX servers don't have direct internet connection due to the security control on them. I am wondering if there is workaround for the python 3.9 related update?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 5.  RE: Migrating to Python 3.9 Ecosystem

    Posted Tue July 18, 2023 04:57 AM

    of course there is a workaround...set up a local repo mirror. 



    ------------------------------
    I regret starting this entire conversation
    ------------------------------



  • 6.  RE: Migrating to Python 3.9 Ecosystem

    Posted Tue July 18, 2023 03:16 PM

    Can you please provide detailed steps?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 7.  RE: Migrating to Python 3.9 Ecosystem

    Posted Tue July 18, 2023 10:57 PM

    Here is an article published sometime back for creating local repo using yum.

    https://developer.ibm.com/articles/configure-yum-on-aix/

     

    But same applies for dnf, we are in process of publishing another article for dnf that will supersede this.

    Creating local repo for AIX Toolbox will be similar to how to create local repo for any other Linux repo.

    So you will get lot of information on internet also.

     

    There is another way where you can create local repo using dnf from AIX toolbox media

    https://community.ibm.com/community/user/power/blogs/sangamesh-mallayya1/2022/02/09/creating-local-repo-with-dnf-and-aix-toolbox-media

     

    Thanks,

     

    Sanket Rathi

     






  • 8.  RE: Migrating to Python 3.9 Ecosystem

    Posted Wed July 19, 2023 10:41 AM

    Hi Sanket Rathi,

    Thanks for the information. That's definitely tech solution I will explore. Meantime, I just realize my current challenge is to update the dnf so that the environment will be associated with python 3.9.16, instead of python 3.7. Instead of running 'dnf update' for real time update, I am wondering if IBM have some module / scripts for me to download and then execute to achieve the dnf update purpose?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 9.  RE: Migrating to Python 3.9 Ecosystem

    Posted Wed July 19, 2023 12:18 PM

    If your environment already has dnf installed and connected to toolbox repo then you can just run "dnf update"

    I am not sure what you are looking here. Just need to make sure for the latest update of dnf you should have rpm.rte at latest version. Here are more details

     

    https://community.ibm.com/community/user/power/discussion/migrating-to-python39-for-aix-toolbox-python3-ecosystem#bm894a7503-8015-4bf4-a5d5-197f17645d3b

     

    Thanks,

     

    Sanket Rathi

     






  • 10.  RE: Migrating to Python 3.9 Ecosystem

    Posted Thu July 20, 2023 10:05 AM

    Hi Sanket Rathi,

    I did read the messages of that link's page previously. But to me, it's not clear how I can make the change so that the AIX Toolbox env will be linked to python3.9.16. Other than rpm.rte, has the dnf bundle package got changed? To me running 'dnf update' to do online update will bring needed changes clearly. But in our environment, it's not doable. I have tried to run the dnf update against the local Toolbox repo (for python 3.7) and then run dnf update python3 and dnf install python3.9-3.9.16-2.aix7.1.ppc.rpm. I still got the same result as before: python3 still points to python 3.7. Please help. By the way, I have already updated rpm.rte to version 4.15.1.1010 .

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 11.  RE: Migrating to Python 3.9 Ecosystem

    Posted Fri July 21, 2023 04:30 AM

    Hi Mi,

    If understand, you don't have infrastrucutre to create a local repo using latest Toolbox packages ?

    The local repo you currently have is static list of packages and it would be poiting to your local mount path.

    local repo is refreshed mostly twice in a year.

    Only option for you is to get the list of packages to update DNF and python3 to update them manually ? 



    ------------------------------
    SANGAMESH
    ------------------------------



  • 12.  RE: Migrating to Python 3.9 Ecosystem

    Posted Fri July 21, 2023 03:24 PM

    Hi SANGAMESH,

    Our team doesn't have the server that meets the requirements for building a local repo (a Unix server with internet connection). So downloading the packages for DNF / python3 update, and doing the update manually is a much easier option. Can you please provide the detailed steps (including the package list)?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 13.  RE: Migrating to Python 3.9 Ecosystem

    Posted Thu July 27, 2023 03:29 PM

    Hi SANGAMESH,

    I have tried the following to update the dnf. But it still failed. Please help.

    I have compares the current dnf related packages in our local repository with those under https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.1/dnf-plugins-core/ and https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc-7.1/dnf/. I find we don't have those "*4.2.17-32_51*", "*4.0.16-32_51*", "*4.0.16-32_52*" packages and "python3.9*" packages. I downloaded them and copied over to /mnt/RPMS/ppc-7.1, which is defined in [Local_AIX_Toolbox_71] section in the dnf.conf. I then ran 'dnf update'. But this stiil doesn't work.

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 14.  RE: Migrating to Python 3.9 Ecosystem

    Posted Mon July 31, 2023 10:47 AM

    Hi SANGAMESH and Sanket Rathi,

    Can one of you please respond?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 15.  RE: Migrating to Python 3.9 Ecosystem

    Posted Tue August 01, 2023 10:04 AM

    Hi Mi

    Actually repodata information has to be updated with running createrepo if any new packages are copied.

    Better way here is to sync toolbox packages if you have any machine(AIX or Linux with redhat based package manager) with internet access,

    run createrepo, and use that repo in your machine.



    ------------------------------
    SANGAMESH
    ------------------------------



  • 16.  RE: Migrating to Python 3.9 Ecosystem

    Posted Wed August 02, 2023 10:25 AM

    Hi SANGAMESH,

    I am trying to find the machine with internet access. Can you please provide the IP / DNS name and the port # for IBM Toolbox repo server for online update purpose?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 17.  RE: Migrating to Python 3.9 Ecosystem

    Posted Thu August 03, 2023 10:02 AM

    Hi SANGAMESH,,

    Can you please respond to my above inquiry?

    Thanks

    Mi



    ------------------------------
    Mi Wang
    ------------------------------



  • 18.  RE: Migrating to Python 3.9 Ecosystem

    Posted Thu August 03, 2023 11:58 AM
    Edited by SANGAMESH MALLAYYA Thu August 03, 2023 11:57 AM

    Hi Mi,

    Please see the section number 2 of this article to know what repos to enable and our ftp server details to download the rpm packages.



    ------------------------------
    SANGAMESH
    ------------------------------