New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS 11.1 + Homebrew 2.6.2 + Python 3.9.1 = "IDLE" crash #86857
Comments
Process: Python [3355] Date/Time: 2020-12-20 21:22:43.045 +0300 Time Awake Since Boot: 940 seconds System Integrity Protection: enabled Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Application Specific Information: Thread 0 Crashed:: Dispatch queue: com.apple.main-thread Thread 1: Thread 2: Thread 3: Thread 4: Thread 5: Thread 0 crashed with X86 Thread State (64-bit): Logical CPU: 0 Thread 0 instruction stream not available. Thread 0 last branch register state not available. Binary Images: External Modification Summary: VM Region Summary:
REGION TYPE SIZE COUNT (non-coalesced) Model: MacBookAir9,1, BootROM 1554.60.15.0.0 (iBridge: 18.16.13030.0.0,0), 2 processors, Dual-Core Intel Core i3, 1,1 GHz, 8 GB, SMC |
This is a 'ancient, buggy tcl/tk 8.5.9 on OS11' issue, not an IDLE issue. Only 8.6.10 has a chance with OS11, and even that is a bit flakey. But I have no issues so far running 3.9.1 and IDLE with the Universal2 OS11 build from python.org on Mohave. What happens if you run 'python3.9' on a command line? What about 'python 3.9 -c "import tkinter; tkinter.Tk()"'? Ned & Ronald: I expect we should close this as 3rd party (Apple, Active State (tcl/tk), and homebrew). Do either of you want to add anything? |
This is the same sort of crash of a Homebrew Python as reported in bpo-42480 and the root cause is the same: the Homebrew recipe is allowing building and linking with the known faulty and deprecated Apple-provided system Tcl and Tk 8.5.9 frameworks. It needs to be modified to use a newer (8.6.x) version of Tcl and Tk. |
petr@air-anastasia ~ % python3 -c "import tkinter; tkinter.Tk()" >>> tkinter.TclVersion
8.5
>>> tkinter.TkVersion
8.5 petr@air-anastasia ~ % brew install tcl-tk ==> Downloading https://homebrew.bintray.com/bottles/tcl-tk-8.6.10.big_sur.bottl If you need to have tcl-tk first in your PATH run: For compilers to find tcl-tk you may need to set: ==> Summary I have tried to update tcl-tk with the homebrew, but in command line I see 8.5 |
You should check with the Homebrew project; we have no insight into or control over their packaging choices. Good luck! |
Hi Ned, FX from Homebrew here. One of the reasons we a couple of years ago to stick with macOS system tcl-tk was that cpython's configure does not currently allow to build against our tcl-tk, which is not a framework but a simple Unix-style library build. We can definitely reconsider if you recommend a newer tcl-tk, but do you know if the build issues with non-framework tcl-tk have been fixed? |
After checking, I can see the code in cpython's setup.py is still there. detect_tkinter_darwin will prefer the system's version over anything we can specific in our cflags or ldflags. This seems contrary to the advice above not to use macOS system Tcl/Tk. |
If you are not using Tcl and Tk framework builds installed in /Library, you use the configure or make options: --with-tcltk-includes='-I...' to specify exactly where to find your versions of Tcl and Tk. See the comments in setup.py: def detect_tkinter_explicitly(self):
# Build _tkinter using explicit locations for Tcl/Tk.
#
# This is enabled when both arguments are given to ./configure:
#
# --with-tcltk-includes="-I/path/to/tclincludes \
# -I/path/to/tkincludes"
# --with-tcltk-libs="-L/path/to/tcllibs -ltclm.n \
# -L/path/to/tklibs -ltkm.n"
#
# These values can also be specified or overridden via make:
# make TCLTK_INCLUDES="..." TCLTK_LIBS="..."
#
# This can be useful for building and testing tkinter with multiple
# versions of Tcl/Tk. Note that a build of Tk depends on a particular
# build of Tcl so you need to specify both arguments and use care when
# overriding.
|
But we can override with --with-tcltk-includes and --with-tcltk-libs |
Our messages crossed, thanks Ned for the help. Hopefully we'll be solving this in a way that benefit most users. |
Guys, thank you all for joining the conversation! I don't understand what exactly should I do to fix this, but I have a lot to study through py4u and plenty of time before I will really need Python fixed. |
To use tkinter and hence IDLE and turtle on macOS, get the Mac Python installer on python.org. |
I'd wait for a Homebrew recipe update. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: