Getting this message from running Python 3.12.7, Pyside6 6.8.0.2 on MacBook Air M1 with Sequoia 15.0.1.
Best explanation found…
Why This Message Appears
- Input Method Kit (IMK):
• macOS uses the Input Method Kit (IMK) to handle keyboard input and text input methods, including internationalization and other text input scenarios.
• When a Python application initializes certain GUI frameworks or interacts with the graphical user interface, macOS tries to determine which IMKClient and IMKInputSession subclasses to use for handling input. - IMKClient_Legacy and IMKInputSession_Legacy:
• The messages indicate that macOS is using legacy versions of IMKClient and IMKInputSession for handling input. This usually happens when the Python process does not fully support or register with the latest macOS input systems. - Python GUI Frameworks:
• GUI frameworks such as OpenCV, matplotlib, or Tkinter may trigger this log when they create windows or handle user input. This is because they might not be optimized for the latest macOS input system APIs. - Logging Behavior:
• macOS logs this information for diagnostic purposes, but it does not impact the functionality of your Python script. It’s essentially just informational output.
How to Suppress or Address the Issue
- Ignore the Logs:
• Since these logs do not affect your program’s functionality, the simplest approach is to ignore them. - Suppressing Warnings in Python:
• If you find the logs annoying, you can suppress such output by setting environment variables or redirecting stderr. For example, you can run your Python script with:
python -W ignore script.py
• This will suppress warnings, but may not completely remove these specific logs.
Quick Answer from GPT.
I did not tried python script but, hope this will help thx.