Closed tornupnegatives closed 2 years ago
You need to download Python3 from python.org and install it. Then everything will be fine. I am using macOS 12.2.1 (Monterey) on a MacBook Pro (16-inch, 2019) and a Mac Pro (Late 2013). It seems to be no problem.
You need to download Python3 from python.org and install it. Then everything will be fine.
That's interesting, thanks :+1:
@JamesH65 Maybe it's worth mentioning that in this repo's README.md ?
EDIT: Deleted my comment because apparently it was incorrect.
You need to download Python3 from python.org and install it.
The recommended way to install Python on macOS is via Homebrew, see Section 9.1 in "Getting started with Raspberry Pi Pico".
I think @create-msugi makes a valid point in that the root of this error is a mismatch between my Python environment (via pyenv-virtualenv from Homebrew) and the system's Tk build. However, anyone who works with Python academically or professionally is bound to have more than one environment. As such, installing via python.org or even straight from Homebrew as @lurch suggested may be undesirable.
Ideally, there would be a way to install Tk/tkinter via pip or Homebrew and put that in the $PATH. I am just not experienced enough with Tk to know how this is done... Other suggestions appreciated.
UPDATE: I was able to get it working by installing tcl-tk
via Homebrew and then re-installing Python via pyenv. Finding a Python version that would build on macOS was a whole different can of worms, but at least the GUI is all good now :).
Closing since it is more of a Python/Tk problem than a RPi problem.
Running
pico_project.py
results in a completely black window being displayed, and the following warning is issued:I am running macOS 12.2.1 on a MacBook Pro (15-inch, 2019).