In Macos,when I compile a python program, it appears: _tkinter TclError: can't find package Tix
How to reslove it ?
In Macos,when I compile a python program, it appears: _tkinter TclError: can't find package Tix
How to reslove it ?
Copyright © 2021 Jogjafile Inc.
This is my question, It cost my whole days, I just want to record it or help others.
Download software
Download xQuartz: download xQuartz
Download Tcl 8.5 and Tk 8.5
(1) weblink goto:Tcl Tk download link
(2) in the bottom of the webpage,choose which version you want.
(3) remember: need download the same verion.
Down Tix 8.4, the version could be different to the tcl/tk.
The weblink is: Tix download
Prepare*
you could got: XQuartz-2.8.1.dmg, just open and install it with default choice.
create a dir named "src", suggest not change the "src" dir name.
move all three zip file to the src dir.
double click ,just unzip all the three file.
Compile
compile tcl
[ Tips: not need make install ]
compile tx, and install it
[IMPORTANT] --with-tcl=**** replace your real dir.
the last char of "dir--with-tcl", must be "/"
[IMPORTANT] --with-tcl=**** --with-tk=**** replace your real dir.
the last char of "dir--with-**", must be "/"
NOW the Tix has been installed.
Question
If receieve could not find the tclConfig.h:
check the dir in your compile configure order set, whether if have the "/" is the last char?
2.If you mac feedback a fatal error: ‘X11/Xlib.h’ file not found during compile, you should link the file:
Check
Now, a window with title "tix" appeared.
congratulation!!!