[GH-ISSUE #92] OSX TK inter problem solved #82

Closed
opened 2026-02-25 20:34:36 +03:00 by kerem · 2 comments
Owner

Originally created by @FetchFast on GitHub (Mar 4, 2021).
Original GitHub issue: https://github.com/B16f00t/whapa/issues/92

Please add this to the FAQ/Instructions:

To get this working on OSX:

  1. install a later version of TK
    brew install tcl-tk
  2. Uninstall python3 and then download and reinstall python from python.org
    brew uninstall python3
  3. Run with
    python3.9 whapa-gui.py

This is how you fix the error on OSX:

% python3 whapa-gui.py                             
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Traceback (most recent call last):
  File "whapa-gui.py", line 1457, in <module>
    Whapa(img_folder, icons)
  File "whapa-gui.py", line 56, in __init__
    self.iconlogo = PhotoImage(file=self.icons[0])
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4061, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4006, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Users/j/src/whapa/images/logo.png"

References:
https://gist.github.com/haliaeetus/529ac14438d139ee905101b99224d9b3
https://gist.github.com/txoof/675e72d43f1bfbade04fdcec99ff4085
https://stackoverflow.com/questions/36760839/why-my-python-installed-via-home-brew-not-include-tkinter/48737927
https://github.com/pyenv/pyenv/issues/94

Originally created by @FetchFast on GitHub (Mar 4, 2021). Original GitHub issue: https://github.com/B16f00t/whapa/issues/92 Please add this to the FAQ/Instructions: To get this working on OSX: 1) install a later version of TK `brew install tcl-tk` 2) Uninstall python3 and then download and reinstall python from python.org `brew uninstall python3` 3) Run with `python3.9 whapa-gui.py` This is how you fix the error on OSX: ``` % python3 whapa-gui.py DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Traceback (most recent call last): File "whapa-gui.py", line 1457, in <module> Whapa(img_folder, icons) File "whapa-gui.py", line 56, in __init__ self.iconlogo = PhotoImage(file=self.icons[0]) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4061, in __init__ Image.__init__(self, 'photo', name, cnf, master, **kw) File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/tkinter/__init__.py", line 4006, in __init__ self.tk.call(('image', 'create', imgtype, name,) + options) _tkinter.TclError: couldn't recognize data in image file "/Users/j/src/whapa/images/logo.png" ``` References: https://gist.github.com/haliaeetus/529ac14438d139ee905101b99224d9b3 https://gist.github.com/txoof/675e72d43f1bfbade04fdcec99ff4085 https://stackoverflow.com/questions/36760839/why-my-python-installed-via-home-brew-not-include-tkinter/48737927 https://github.com/pyenv/pyenv/issues/94
kerem closed this issue 2026-02-25 20:34:36 +03:00
Author
Owner

@FetchFast commented on GitHub (Mar 4, 2021):

I also needed to:
pip3 install pycryptodome
as well but I'm not sure where this would go in the install instructions

<!-- gh-comment-id:790657574 --> @FetchFast commented on GitHub (Mar 4, 2021): I also needed to: `pip3 install pycryptodome` as well but I'm not sure where this would go in the install instructions
Author
Owner

@B16f00t commented on GitHub (Mar 4, 2021):

Thank you so much for your contribution

<!-- gh-comment-id:790897677 --> @B16f00t commented on GitHub (Mar 4, 2021): Thank you so much for your contribution
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/whapa#82
No description provided.