Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major Error #6

Open
techpluscraft opened this issue Jan 29, 2022 · 1 comment
Open

Major Error #6

techpluscraft opened this issue Jan 29, 2022 · 1 comment

Comments

@techpluscraft
Copy link

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
@SamyBencherif
Copy link

The patch solution is to run python3 pip install -m pyobjc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants