This python (Python 3.7.3) code:
from pynput.keyboard import Listener
import tkinter as tk
def on_press(key):
pass
with Listener(on_press=on_press) as listener :
root = tk.Tk()
root.mainloop()
Fails with the message:
Illegal instruction: 4
My googling hasn't got very far, other than to suggest that it's a problem that appears on OSX (I am running macOS Catalina 10.15.6)
What is causing this error?
EDIT:
On a zsh (rather than bash) I get this:
joe2021@Josephs-Mac-mini mouse-sniper % python3 mcve2.py
zsh: illegal hardware instruction python3 mcve2.py
Both pynput and tkinter work fine seperately which suggests it's not a problem with the libraries...