Skip to content

Tkinter code running on Anaconda Build of Python on macOS 10.14.6 crashes the windowing system #11165

Open

Description

@tazzben

Consider the simple hello world on this page:

https://docs.python.org/3/library/tkinter.html

When run on macOS 10.14.6 with Anaconda 2019.7, the entire windowing system crashes (knocking the user back to the window login). I've tested this on three different machines and they exhibit the same behavior (some machines have anaconda installed for all users, some just the signed in user).

It seems to be specific to the installation of Anaconda: I've created a virtual machine running 10.14.6 containing only Python 3.7.4 (installed from python.org) and the code works as expected. However, one of the more interesting aspects of this bug is that Anaconda only needs to be installed to have the problem. If you execute the code using the standard python build, but anaconda is installed, it still crashes.

I suspect this problem relates to how anaconda installs TK/TCL packages. Something that changed in macOS 10.14.6 resulted in some kind of conflict (as it didn't crash in macOS 10.14.5).

conda info
Details

active environment : base
active env location : //anaconda3
shell level : 1
user config file : /Users/ben/.condarc
populated config files : /Users/ben/.condarc
conda version : 4.7.10
conda-build version : 3.18.8
python version : 3.7.3.final.0
virtual packages :
base environment : //anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : //anaconda3/pkgs
/Users/ben/.conda/pkgs
envs directories : //anaconda3/envs
/Users/ben/.conda/envs
platform : osx-64
user-agent : conda/4.7.10 requests/2.22.0 CPython/3.7.3 Darwin/18.7.0 OSX/10.14.6
UID:GID : 501:20
netrc file : None
offline mode : False

conda list --show-channel-urls
Details
# packages in environment at //anaconda3:
#
# Name                    Version                   Build  Channel
_ipyw_jlab_nb_ext_conf    0.1.0                    py37_0    defaults
alabaster                 0.7.12                   py37_0    defaults
anaconda                  2019.07                  py37_0    defaults
anaconda-client           1.7.2                    py37_0    defaults
anaconda-navigator        1.9.7                    py37_0    defaults
anaconda-project          0.8.3                      py_0    defaults
appnope                   0.1.0                    py37_0    defaults
appscript                 1.1.0            py37h1de35cc_0    defaults
asn1crypto                0.24.0                   py37_0    defaults
astroid                   2.2.5                    py37_0    defaults
astropy                   3.2.1            py37h1de35cc_0    defaults
atomicwrites              1.3.0                    py37_1    defaults
attrs                     19.1.0                   py37_1    defaults
babel                     2.7.0                      py_0    defaults
backcall                  0.1.0                    py37_0    defaults
backports                 1.0                        py_2    defaults
backports.functools_lru_cache 1.5                        py_2    defaults
backports.os              0.1.1                    py37_0    defaults
backports.shutil_get_terminal_size 1.0.0                    py37_2    defaults
backports.tempfile        1.0                        py_1    defaults
backports.weakref         1.0.post1                  py_1    defaults
beautifulsoup4            4.7.1                    py37_1    defaults
bitarray                  0.9.3            py37h1de35cc_0    defaults
bkcharts                  0.2                      py37_0    defaults
blas                      1.0                         mkl    defaults
bleach                    3.1.0                    py37_0    defaults
blosc                     1.16.3               hd9629dc_0    defaults
bokeh                     1.2.0                    py37_0    defaults
boto                      2.49.0                   py37_0    defaults
bottleneck                1.2.1            py37h1d22016_1    defaults
bzip2                     1.0.8                h1de35cc_0    defaults
ca-certificates           2019.5.15                     0    defaults
certifi                   2019.6.16                py37_0    defaults
cffi                      1.12.3           py37hb5b8e2f_0    defaults
chardet                   3.0.4                    py37_1    defaults
click                     7.0                      py37_0    defaults
cloudpickle               1.2.1                      py_0    defaults
clyent                    1.2.2                    py37_1    defaults
colorama                  0.4.1                    py37_0    defaults
conda                     4.7.10                   py37_0    defaults
conda-build               3.18.8                   py37_0    defaults
conda-env                 2.6.0                         1    defaults
conda-package-handling    1.3.11                   py37_0    defaults
conda-verify              3.4.2                      py_1    defaults
contextlib2               0.5.5                    py37_0    defaults
cryptography              2.7              py37ha12b0ac_0    defaults
curl                      7.65.2               ha441bb4_0    defaults
cycler                    0.10.0                   py37_0    defaults
cython                    0.29.12          py37h0a44026_0    defaults
cytoolz                   0.10.0           py37h1de35cc_0    defaults
dask                      2.1.0                      py_0    defaults
dask-core                 2.1.0                      py_0    defaults
dbus                      1.13.6               h90a0687_0    defaults
decorator                 4.4.0                    py37_1    defaults
defusedxml                0.6.0                      py_0    defaults
distributed               2.1.0                      py_0    defaults
docutils                  0.14                     py37_0    defaults
entrypoints               0.3                      py37_0    defaults
et_xmlfile                1.0.1                    py37_0    defaults
expat                     2.2.6                h0a44026_0    defaults
fastcache                 1.1.0            py37h1de35cc_0    defaults
filelock                  3.0.12                     py_0    defaults
flask                     1.1.1                      py_0    defaults
freetype                  2.9.1                hb4e5f40_0    defaults
future                    0.17.1                   py37_0    defaults
get_terminal_size         1.0.0                h7520d66_0    defaults
gettext                   0.19.8.1             h15daf44_3    defaults
gevent                    1.4.0            py37h1de35cc_0    defaults
glib                      2.56.2               hd9629dc_0    defaults
glob2                     0.7                        py_0    defaults
gmp                       6.1.2                hb37e062_1    defaults
gmpy2                     2.0.8            py37h6ef4df4_2    defaults
greenlet                  0.4.15           py37h1de35cc_0    defaults
h5py                      2.9.0            py37h3134771_0    defaults
hdf5                      1.10.4               hfa1e0ec_0    defaults
heapdict                  1.0.0                    py37_2    defaults
html5lib                  1.0.1                    py37_0    defaults
icu                       58.2                 h4b95b61_1    defaults
idna                      2.8                      py37_0    defaults
imageio                   2.5.0                    py37_0    defaults
imagesize                 1.1.0                    py37_0    defaults
importlib_metadata        0.17                     py37_1    defaults
intel-openmp              2019.4                      233    defaults
ipykernel                 5.1.1            py37h39e3cac_0    defaults
ipython                   7.6.1            py37h39e3cac_0    defaults
ipython_genutils          0.2.0                    py37_0    defaults
ipywidgets                7.5.0                      py_0    defaults
isort                     4.3.21                   py37_0    defaults
itsdangerous              1.1.0                    py37_0    defaults
jbig                      2.1                  h4d881f8_0    defaults
jdcal                     1.4.1                      py_0    defaults
jedi                      0.13.3                   py37_0    defaults
jinja2                    2.10.1                   py37_0    defaults
joblib                    0.13.2                   py37_0    defaults
jpeg                      9b                   he5867d9_2    defaults
json5                     0.8.4                      py_0    defaults
jsonschema                3.0.1                    py37_0    defaults
jupyter                   1.0.0                    py37_7    defaults
jupyter_client            5.3.1                      py_0    defaults
jupyter_console           6.0.0                    py37_0    defaults
jupyter_core              4.5.0                      py_0    defaults
jupyterlab                1.0.2            py37hf63ae98_0    defaults
jupyterlab_server         1.0.0                      py_0    defaults
keyring                   18.0.0                   py37_0    defaults
kiwisolver                1.1.0            py37h0a44026_0    defaults
krb5                      1.16.1               hddcf347_7    defaults
lazy-object-proxy         1.4.1            py37h1de35cc_0    defaults
libarchive                3.3.3                h786848e_5    defaults
libcurl                   7.65.2               h051b688_0    defaults
libcxx                    4.0.1                hcfea43d_1    defaults
libcxxabi                 4.0.1                hcfea43d_1    defaults
libedit                   3.1.20181209         hb402a30_0    defaults
libffi                    3.2.1                h475c297_4    defaults
libgfortran               3.0.1                h93005f0_2    defaults
libiconv                  1.15                 hdd342a3_7    defaults
liblief                   0.9.0                h2a1bed3_2    defaults
libpng                    1.6.37               ha441bb4_0    defaults
libsodium                 1.0.16               h3efe00b_0    defaults
libssh2                   1.8.2                ha12b0ac_0    defaults
libtiff                   4.0.10               hcb84e12_2    defaults
libxml2                   2.9.9                hf6e021a_1    defaults
libxslt                   1.1.33               h33a18ac_0    defaults
llvm-openmp               4.0.1                hcfea43d_1    defaults
llvmlite                  0.29.0           py37h98b8051_0    defaults
locket                    0.2.0                    py37_1    defaults
lxml                      4.3.4            py37hef8c89e_0    defaults
lz4-c                     1.8.1.2              h1de35cc_0    defaults
lzo                       2.10                 h362108e_2    defaults
markupsafe                1.1.1            py37h1de35cc_0    defaults
matplotlib                3.1.0            py37h54f8f79_0    defaults
mccabe                    0.6.1                    py37_1    defaults
mistune                   0.8.4            py37h1de35cc_0    defaults
mkl                       2019.4                      233    defaults
mkl-service               2.0.2            py37h1de35cc_0    defaults
mkl_fft                   1.0.12           py37h5e564d8_0    defaults
mkl_random                1.0.2            py37h27c97d8_0    defaults
mock                      3.0.5                    py37_0    defaults
more-itertools            7.0.0                    py37_0    defaults
mpc                       1.1.0                h6ef4df4_1    defaults
mpfr                      4.0.1                h3018a27_3    defaults
mpmath                    1.1.0                    py37_0    defaults
msgpack-python            0.6.1            py37h04f5b5a_1    defaults
multipledispatch          0.6.0                    py37_0    defaults
navigator-updater         0.2.1                    py37_0    defaults
nbconvert                 5.5.0                      py_0    defaults
nbformat                  4.4.0                    py37_0    defaults
ncurses                   6.1                  h0a44026_1    defaults
networkx                  2.3                        py_0    defaults
nltk                      3.4.4                    py37_0    defaults
nose                      1.3.7                    py37_2    defaults
notebook                  6.0.0                    py37_0    defaults
numba                     0.44.1           py37h6440ff4_0    defaults
numexpr                   2.6.9            py37h7413580_0    defaults
numpy                     1.16.4           py37hacdab7b_0    defaults
numpy-base                1.16.4           py37h6575580_0    defaults
numpydoc                  0.9.1                      py_0    defaults
olefile                   0.46                     py37_0    defaults
openpyxl                  2.6.2                      py_0    defaults
openssl                   1.1.1c               h1de35cc_1    defaults
packaging                 19.0                     py37_0    defaults
pandas                    0.24.2           py37h0a44026_0    defaults
pandoc                    2.2.3.2                       0    defaults
pandocfilters             1.4.2                    py37_1    defaults
parso                     0.5.0                      py_0    defaults
partd                     1.0.0                      py_0    defaults
path.py                   12.0.1                     py_0    defaults
pathlib2                  2.3.4                    py37_0    defaults
patsy                     0.5.1                    py37_0    defaults
pcre                      8.43                 h0a44026_0    defaults
pep8                      1.7.1                    py37_0    defaults
pexpect                   4.7.0                    py37_0    defaults
pickleshare               0.7.5                    py37_0    defaults
pillow                    6.1.0            py37hb68e598_0    defaults
pip                       19.1.1                   py37_0    defaults
pkginfo                   1.5.0.1                  py37_0    defaults
pluggy                    0.12.0                     py_0    defaults
ply                       3.11                     py37_0    defaults
prometheus_client         0.7.1                      py_0    defaults
prompt_toolkit            2.0.9                    py37_0    defaults
psutil                    5.6.3            py37h1de35cc_0    defaults
ptyprocess                0.6.0                    py37_0    defaults
py                        1.8.0                    py37_0    defaults
py-lief                   0.9.0            py37h1413db1_2    defaults
pycodestyle               2.5.0                    py37_0    defaults
pycosat                   0.6.3            py37h1de35cc_0    defaults
pycparser                 2.19                     py37_0    defaults
pycrypto                  2.6.1            py37h1de35cc_9    defaults
pycurl                    7.43.0.3         py37ha12b0ac_0    defaults
pyflakes                  2.1.1                    py37_0    defaults
pygments                  2.4.2                      py_0    defaults
pylint                    2.3.1                    py37_0    defaults
pyodbc                    4.0.26           py37h0a44026_0    defaults
pyopenssl                 19.0.0                   py37_0    defaults
pyparsing                 2.4.0                      py_0    defaults
pyqt                      5.9.2            py37h655552a_2    defaults
pyrsistent                0.14.11          py37h1de35cc_0    defaults
pysocks                   1.7.0                    py37_0    defaults
pytables                  3.5.2            py37h5bccee9_1    defaults
pytest                    5.0.1                    py37_0    defaults
pytest-arraydiff          0.3              py37h39e3cac_0    defaults
pytest-astropy            0.5.0                    py37_0    defaults
pytest-doctestplus        0.3.0                    py37_0    defaults
pytest-openfiles          0.3.2                    py37_0    defaults
pytest-remotedata         0.3.1                    py37_0    defaults
python                    3.7.3                h359304d_0    defaults
python-dateutil           2.8.0                    py37_0    defaults
python-libarchive-c       2.8                     py37_11    defaults
python.app                2                        py37_9    defaults
pytz                      2019.1                     py_0    defaults
pywavelets                1.0.3            py37h1d22016_1    defaults
pyyaml                    5.1.1            py37h1de35cc_0    defaults
pyzmq                     18.0.0           py37h0a44026_0    defaults
qt                        5.9.7                h468cd18_1    defaults
qtawesome                 0.5.7                    py37_1    defaults
qtconsole                 4.5.1                      py_0    defaults
qtpy                      1.8.0                      py_0    defaults
readline                  7.0                  h1de35cc_5    defaults
requests                  2.22.0                   py37_0    defaults
rope                      0.14.0                     py_0    defaults
ruamel_yaml               0.15.46          py37h1de35cc_0    defaults
scikit-image              0.15.0           py37h0a44026_0    defaults
scikit-learn              0.21.2           py37h27c97d8_0    defaults
scipy                     1.3.0            py37h1410ff5_0    defaults
seaborn                   0.9.0                    py37_0    defaults
send2trash                1.5.0                    py37_0    defaults
setuptools                41.0.1                   py37_0    defaults
simplegeneric             0.8.1                    py37_2    defaults
singledispatch            3.4.0.3                  py37_0    defaults
sip                       4.19.8           py37h0a44026_0    defaults
six                       1.12.0                   py37_0    defaults
snappy                    1.1.7                he62c110_3    defaults
snowballstemmer           1.9.0                      py_0    defaults
sortedcollections         1.1.2                    py37_0    defaults
sortedcontainers          2.1.0                    py37_0    defaults
soupsieve                 1.8                      py37_0    defaults
sphinx                    2.1.2                      py_0    defaults
sphinxcontrib             1.0                      py37_1    defaults
sphinxcontrib-applehelp   1.0.1                      py_0    defaults
sphinxcontrib-devhelp     1.0.1                      py_0    defaults
sphinxcontrib-htmlhelp    1.0.2                      py_0    defaults
sphinxcontrib-jsmath      1.0.1                      py_0    defaults
sphinxcontrib-qthelp      1.0.2                      py_0    defaults
sphinxcontrib-serializinghtml 1.1.3                      py_0    defaults
sphinxcontrib-websupport  1.1.2                      py_0    defaults
spyder                    3.3.6                    py37_0    defaults
spyder-kernels            0.5.1                    py37_0    defaults
sqlalchemy                1.3.5            py37h1de35cc_0    defaults
sqlite                    3.29.0               ha441bb4_0    defaults
statsmodels               0.10.0           py37h1d22016_0    defaults
sympy                     1.4                      py37_0    defaults
tblib                     1.4.0                      py_0    defaults
terminado                 0.8.2                    py37_0    defaults
testpath                  0.4.2                    py37_0    defaults
tk                        8.6.8                ha441bb4_0    defaults
toolz                     0.10.0                     py_0    defaults
tornado                   6.0.3            py37h1de35cc_0    defaults
tqdm                      4.32.1                     py_0    defaults
traitlets                 4.3.2                    py37_0    defaults
unicodecsv                0.14.1                   py37_0    defaults
unixodbc                  2.3.7                h1de35cc_0    defaults
urllib3                   1.24.2                   py37_0    defaults
wcwidth                   0.1.7                    py37_0    defaults
webencodings              0.5.1                    py37_1    defaults
werkzeug                  0.15.4                     py_0    defaults
wheel                     0.33.4                   py37_0    defaults
widgetsnbextension        3.5.0                    py37_0    defaults
wrapt                     1.11.2           py37h1de35cc_0    defaults
wurlitzer                 1.0.2                    py37_0    defaults
xlrd                      1.2.0                    py37_0    defaults
xlsxwriter                1.1.8                      py_0    defaults
xlwings                   0.15.8                   py37_0    defaults
xlwt                      1.3.0                    py37_0    defaults
xz                        5.2.4                h1de35cc_4    defaults
yaml                      0.1.7                hc338f04_2    defaults
zeromq                    4.3.1                h0a44026_3    defaults
zict                      1.0.0                      py_0    defaults
zipp                      0.5.1                      py_0    defaults
zlib                      1.2.11               h1de35cc_3    defaults
zstd                      1.3.7                h5bba6e5_0    defaults

Activity

  1. Debilski commented on Aug 5, 2019

    @Debilski

    Can confirm the problem on a fresh macOS 10.14.6 with miniconda and tk=8.6.8.
    I want to add the the problem also occurred in the beta for macOS Catalina 10.15 that was released before 10.14.6 (beta 4, I think) but was then apparently resolved in the beta that arrived after 10.14.6 (beta 5). I am not testing the betas anymore currently, so I won’t be able to give further input on that.

  2. kcarnold commented on Aug 7, 2019

    @kcarnold

    I unfortunately confirm this bug on a fresh install of both macOS 10.14.6 and Anaconda. It's clearly Apple's bug; has anyone reported it?

    I've attached the full
    WindowServer_2019-08-07-092951_Kenneths-MacBook-Pro.crash.txt

    crashdump; here's the relevant part:

    Process:               WindowServer [9531]
    Path:                  /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
    Identifier:            WindowServer
    Version:               600.00 (340.54)
    Code Type:             X86-64 (Native)
    Parent Process:        launchd [1]
    Responsible:           WindowServer [9531]
    User ID:               88
    
    Date/Time:             2019-08-07 09:29:04.096 -0400
    OS Version:            Mac OS X 10.14.6 (18G87)
    Report Version:        12
    Anonymous UUID:        78BD0FA6-6033-BEED-4187-9247033D9778
    
    Sleep/Wake UUID:       1476ADD3-4C0B-4904-8657-1268CD642BF9
    
    Time Awake Since Boot: 30000 seconds
    Time Since Wake:       400 seconds
    
    System Integrity Protection: enabled
    
    Crashed Thread:        0  Dispatch queue: com.apple.main-thread
    
    Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
    Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
    Exception Note:        EXC_CORPSE_NOTIFY
    
    Termination Signal:    Segmentation fault: 11
    Termination Reason:    Namespace SIGNAL, Code 0xb
    Terminating Process:   exc handler [9531]
    
    VM Regions Near 0:
    --> 
        __TEXT                 000000010a3f4000-000000010a3f6000 [    8K] r-x/rwx SM=COW  /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/Resources/WindowServer
    
    Application Specific Information:
    StartTime:2019-08-07 09:27:37
    GPU:IG&NV
    MetalDevice for accelerator(0x3703): 0x7f919b027408 (MTLDevice: 0x10d09b000)
    MetalDevice for accelerator(0x4827): 0x7f9199c0b6c8 (MTLDevice: 0x10d068000)
    IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPP/GFX0@0/NVDA,Display-D@3/NVDA
    IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/P0P2@1/IOPP/GFX0@0/NVDA,Display-A@0/NVDA
    
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0   com.apple.SkyLight            	0x00007fff55a54485 CGXBeginSurfaceLayerUpdate + 3207
    1   com.apple.SkyLight            	0x00007fff55b031a9 prepare_CoreAnimation_update_state(CGXConnection*, CGXWindowSubArray, bool, bool) + 636
    2   com.apple.SkyLight            	0x00007fff55afec39 CGXUpdateDisplay + 7081
    3   com.apple.SkyLight            	0x00007fff55afce20 update_display_callback(void*, double) + 298
    4   com.apple.SkyLight            	0x00007fff55b418a1 run_timer_pass + 489
    5   com.apple.SkyLight            	0x00007fff55b73bd2 CGXRunOneServicesPass + 180
    6   com.apple.SkyLight            	0x00007fff55b74d52 server_loop + 602
    7   com.apple.SkyLight            	0x00007fff55b74af1 SLXServer + 1349
    8   WindowServer                  	0x000000010a3f550d 0x10a3f4000 + 5389
    9   libdyld.dylib                 	0x00007fff5c7133d5 start + 1
    
  3. evangelos1 commented on Aug 7, 2019

    @evangelos1

    Same here, the problem started occurring after the recent update to Mojave 10.14.6. Using the stock Anaconda 2019.07 distribution.

  4. Stannislav commented on Aug 9, 2019

    @Stannislav

    Same here - recently updated to Mojave 10.14.6 and tkinter started crashing my mac knocking me back to the login screen.

  5. bentkidder commented on Aug 13, 2019

    @bentkidder

    Same here - reported this to Apple earlier today

  6. chtoby commented on Aug 16, 2019

    @chtoby

    same issue here!

  7. jjhelmus commented on Aug 16, 2019

    @jjhelmus
    Contributor

    This may be related to a similar issue report to conda-forge, conda-forge/tk-feedstock#36

  8. fankaisong commented on Aug 20, 2019

    @fankaisong

    I have finally found this post. I have been searching around why I have this bug until this post
    Same issue here

  9. wmfschneider commented on Aug 20, 2019

    @wmfschneider

    Same issue....

  10. sharahamo commented on Aug 21, 2019

    @sharahamo

    Same issue here

  11. TheodoreEhrenborg commented on Aug 21, 2019

    @TheodoreEhrenborg

    I have this issue on a 9-day old MacBook Pro running macOS 10.14.6 and Anaconda 2019.07. I'll report it to Apple.

  12. TheodoreEhrenborg commented on Aug 25, 2019

    @TheodoreEhrenborg

    This problem does not appear when I run tk=8.6.8 and Python 3.7.0, nor does it appear when I run tk=8.6.7 and Python 3.7.0. I do experience the issue when I run tk=8.6.8 and Python 3.7.4.

  13. sharahamo commented on Aug 25, 2019

    @sharahamo

    @TheodoreEhrenborg I can verify this. I downgraded to 3.7.0 and it works

  14. 19 remaining items

  15. TheodoreEhrenborg commented on Sep 21, 2019

    @TheodoreEhrenborg

    @pgunn Thanks for the script. I ran "python paintman.py" and clicked on the "Work on" button. This opened a "work" window successfully. Maybe I misunderstood your instructions.
    Screen Shot 2019-09-20 at 8 41 08 PM
    Screen Shot 2019-09-20 at 8 41 12 PM

  16. pgunn commented on Sep 21, 2019

    @pgunn

    No, it sounds like for some reason it's crashing for me and not for you. Weird. Let me know if there's more debugging you'd like me to try to explore differences between our systems. For me that "Work on" button is the ticket to a crash.

  17. TheodoreEhrenborg commented on Sep 21, 2019

    @TheodoreEhrenborg

    I agree it's weird. I hope the next macOS release fixes it.

  18. tazzben commented on Sep 27, 2019

    @tazzben
    Author

    Unfortunately the supplemental release (pushed out today or yesterday) does not seem to resolve this issue.

  19. maxime915 commented on Oct 3, 2019

    @maxime915

    I had the same issue with an anaconda environment with python3.6.9 (TkVersion=8.6), I created another environment with python 3.6.6 (TkVersion=8.6) and it works for me now (macOS 10.14.6, conda 4.7.12)

  20. TheodoreEhrenborg commented on Oct 4, 2019

    @TheodoreEhrenborg

    @maxime915 Python 3.6.9 and Python 3.7.4, which both have the issue, were released in July 2019. Python 3.6.6 and Python 3.7.0, which don't have the issue, were released in 2018. It seems plausible that the issue manifests because of something that Python has changed. The actual bug could be in Python, Anaconda, or Apple. But the bug seems to be responding to some quality of more recent Python releases.

    Of course, this is just speculation. I hope macOS Catalina will fix this issue, although I won't upgrade until it has been released successfully without other bugs.

  21. Debilski commented on Oct 4, 2019

    @Debilski

    Current Catalina beta (GM) indeed doesn’t seem to have the problem. It would still be good to see a fix on 10.14 though for users of 32 bit apps who cannot upgrade.

  22. vichug commented on Oct 12, 2019

    @vichug

    i hope developers, especially in the FOSS community, won't rush to Catalina and drop support of previous OSes, as I will have to stick for a while with Mojave (and suppose i'm not the only one)

  23. clemencebic commented on Oct 22, 2019

    @clemencebic

    I had the same problem on Mac OS 10.14.6, I am using anaconda. As I could not change the tk version without recompiling python (https://www.python.org/download/mac/tcltk/ I had to downgrade my python version. The python version 3.6.0 worked well, later and earlier version crashed.

  24. mattsliv commented on Nov 27, 2019

    @mattsliv

    For anyone having this issue using Tk with matplotlib, I replaced
    matplotlib.use('TkArg')
    with
    matplotlib.use('MacOSX')
    and the issues seem to be resolved. Not sure how though.

  25. vqbang commented on Dec 23, 2019

    @vqbang

    @mattsliv Many thanks :D save me tons of hours on looking for a solution.

  26. sean-johnson commented on Jan 14, 2020

    @sean-johnson

    I had the same problem, I found another solution if you are using anaconda. In matplotlib's docs they recommend installing the python framework:

    "On OSX, two different types of Python builds exist: a regular build and a framework build. In order to interact correctly with OSX through the native GUI frameworks, you need a framework build of Python."

    https://matplotlib.org/3.1.0/faq/osx_framework.html

    So following their conda recommendations I ensured python.app framework was installed on my env with conda install python.app . Then instead of using the command python plot-file.py to run my file, I used pythonw plot-file.py to run it. Everything worked fine.

  27. harryparker commented on Feb 18, 2020

    @harryparker

    @sean-johnson , Thanks, for the solution. I didn't do a separate conda python install like you did. However I did do a "conda update --all" today in trying to resolve this problem. (That didn't help, although it did upgrade my python from 3.7.3 to 3.7.6.)

    I tried using "pythonw -m tkinter" from the MacOS 10.14.6 Terminal. This worked successfully when doing the same with "python" instesad of "pythonw" kicked me out to the login screen as others have described.

    I note that "pythonw" runs python version 3.7.0 on my machine, while "python" runs 3.7.6. This may explain why it works as others found a solution by downgrading to python 3.7.0.

  28. qnguyenn commented on May 20, 2020

    @qnguyenn

    Mac os Mojave 10.14.6. the problem come from that my python 3.7.6 is in the anaconda package
    (/opt/anaconda3/bin/python) tkinter app cause the system log out abruptly.
    Downloading python 3.7.6 installer (for macosx 64) from www.python.org and run the installer, python is in the system (/Library/Frameworks/Python.framework/Versions/3.7/bin/python) Tkinter app work fine.

  29. patiencing commented on May 28, 2020

    @patiencing

    I have the same problem on MacOS 10.14.6 with Python 3.7.6, and it dosen't work for me to downgrade to 3.7.0.

    I solved this problem by using old tkinter:
    I uninstalled the Python3 which is downloaded from python.org (it includes tkinter 8.6), and reinstall python by Homebrew (brew install python3). Homwbrew will install Python 3.7.7 without tkinter. So Python 3.7.7 will use the MacOS build-in tkinter(version = 8.5.9).
    It work fine for me.

    But I don't use Anaconda, so you have to check if there are version problem. May be this documentation will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions