Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power

 View Only
  • 1.  Python 3.9 and tkinter

    Posted Wed March 23, 2022 10:12 PM
    I have a freash install of 7200-05-03-2148, but I seem to missing something that wasn't flagged as a dependency.

    $ /opt/freeware/bin/python3.9 -m tkinter
    Traceback (most recent call last):
    File "/opt/freeware/lib64/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
    File "/opt/freeware/lib64/python3.9/runpy.py", line 147, in _get_module_details return _get_module_details(pkg_main_name, error)
    File "/opt/freeware/lib64/python3.9/runpy.py", line 111, in _get_module_details __import__(pkg_name)
    File "/opt/freeware/lib64/python3.9/tkinter/__init__.py", line 37, in <module>

    import _tkinter # If this fails your Python may not be configured for Tk
    ImportError: 0509-022 Cannot load module /opt/freeware/lib/libXft.a(libXft.so.2).
    0509-150 Dependent module /usr/lpp/X11/lib/R7/libXrender.a(libXrender.so.1) could not be loaded.
    0509-152 Member libXrender.so.1 is not found in archive
    0509-022 Cannot load module /opt/freeware/lib64/python3.9/lib-dynload/_tkinter.cpython-39.so.
    0509-150 Dependent module /opt/freeware/lib/libXft.a(libXft.so.2) could not be loaded.

    ------------------------------
    Lucas Schroeder
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Python 3.9 and tkinter

    Posted Wed March 23, 2022 10:19 PM
    Edited by Jan Harris Wed March 23, 2022 10:20 PM
    Hello Lucas
    Make sure you have the libXrender package installed, and that you do not have LIBPATH set to load /usr/lib before /opt/freeware/lib. 

    AIX provides /usr/lpp/X11/lib/R7/libXrender.a in X11.basel.lib.

    Your tkinter requires the Open Source version libXrender package, available on the AIX Toolbox.
    https://www.ibm.com/support/pages/node/883796

    See AIX Open Source Tip: libXrender.a errors for IBM Installation Manager (IBMIM) and other OSS products
    • https://www.ibm.com/support/pages/node/6467691


    ------------------------------
    Jan Harris
    ------------------------------



  • 3.  RE: Python 3.9 and tkinter

    Posted Wed March 23, 2022 10:42 PM
    Thanks.  Unsetting LIBPATH fixed my problem.

    ------------------------------
    Lucas Schroeder
    ------------------------------