Search code examples
thonny

How to make Thonny use installed Python 3.9 (macos)?


I'm on macos 10.14.6, with Thonny 3.3.3 / Darwin 18.7.0 / Python 3.7.9 / Tk 8.6.8. I'm using Thonny to program a RaspPi Pico.

Thonny crashes a lot - apparently because of bugs in the tkinter tk library. (According to searches - Tkinter crashes computer after MacOS 10.14.6 update )

I've installed the official Python 3.9.1 - but it seems that also has tk 8.6.

Can I get Thonny to use Python 3.9.1? And will that help stop the crashes?

Or, can we get Thonny to use the older system installed Tk, which is 8.5? Will that help?

Thanks.


Solution

  • You could try installing the universal variant of Python, which is built with newer Tk: https://www.python.org/ftp/python/3.9.1/python-3.9.1-macos11.0.pkg (it says macos11, but it should work in 10.9+ macOS-es as well).

    After you have installed it, open Terminal and run python3.9 -m pip install thonny and then python3.9 -m thonny. The UI won't be 100% same as with separate application bundle (eg. the main menu will be called "Python" and not "Thonny"), but the main features should work the same.

    Please let me know whether this works better for you!