[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-27 Thread Ethan Welty
Ethan Welty <ethan.we...@gmail.com> added the comment: @ronaldoussoren: The order of the imports made no difference. Even with the call at the top, I got endless errors with both 'spawn' and 'forkserver', with or without importing a graphics backend. Only 'fork' works, and only if a gr

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-26 Thread Ethan Welty
Ethan Welty <ethan.we...@gmail.com> added the comment: Terry Reedy: I just tried your suggestion of a main clause (code below) and it made no difference. ``` import _tkinter import numpy as np # multiprocessing.set_start_method("spawn") import multiprocessing def parallel_

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-21 Thread Ethan Welty
Change by Ethan Welty <ethan.we...@gmail.com>: -- components: +macOS ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33111> ___ _

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-21 Thread Ethan Welty
Ethan Welty <ethan.we...@gmail.com> added the comment: I've tried with additional backends: WX, WXAgg, WXCairo, Qt5Agg (in matplotlib speak). With these, I can at least import matplotlib.pyplot, but as soon as say matplotlib.pyplot.plot is called and the backend is loaded, the code

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-21 Thread Ethan Welty
Ethan Welty <ethan.we...@gmail.com> added the comment: I have tried running the script with: - command line (python ): Works without (breaks with) `import _tkinter`. - basic python console (python): Same as with command line. - ipython: Fails with or without `import _tkinter`. H

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-20 Thread Ethan Welty
Change by Ethan Welty <ethan.we...@gmail.com>: -- versions: -Python 3.8 ___ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33111> ___

[issue33111] Merely importing tkinter breaks parallel code (multiprocessing, sharedmem)

2018-03-20 Thread Ethan Welty
New submission from Ethan Welty <ethan.we...@gmail.com>: Merely importing tkinter breaks the use of parallel code on my system (Mac OSX 10.11.6, tested on Python 2.7.13 / 2.7.14 / 3.5.0 / 3.6.4, all barebones distributions installed with pyenv). I've tested this with both multiproc