PyTouchBar
PyTouchBar copied to clipboard
Major Error
When installing and running the code you get this error:
File "/Users/ADMIN/Documents/Mac Tests/controlbar.py", line 2, in <module>
import PyTouchBar
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyTouchBar/__init__.py", line 5, in <module>
from .TouchBar import *
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/PyTouchBar/TouchBar.py", line 12, in <module>
import objc
ModuleNotFoundError: No module named 'objc'
Here is code to replicate
import pygame
import PyTouchBar
pygame.init()
size = width, height = 400,400
screen = pygame.display.set_mode(size)
PyTouchBar.prepare_pygame()
while True:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
break
The patch solution is to run python3 pip install -m pyobjc