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

No module named 'Cocoa' found when you try to run the examples #2

Open
aovabo opened this issue Feb 1, 2025 · 3 comments
Open

No module named 'Cocoa' found when you try to run the examples #2

aovabo opened this issue Feb 1, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@aovabo
Copy link
Contributor

aovabo commented Feb 1, 2025

Bug Description

Image

Reproduction Steps

  1. run python examples/calculate.py or python examples/try.py

Code Sample

import Cocoa in mlx_use/controller/service.py", line 5

Version

pip 25.0

LLM Model

Claude 3.5 Sonnet

Operating System

macOS sequoia 15.2

Relevant Log Output

@aovabo aovabo added the bug Something isn't working label Feb 1, 2025
@eDeveloperOZ
Copy link
Collaborator

Hi are you still experiencing this issue with last main?
this problem was addressed on this commit 2796f28

Thank you for your contribution!

@thedarkcder
Copy link

Open pyproject.toml

Add the following dependencies to the dependencies group

    "pyobjc-framework-Cocoa",
    "pyobjc-framework-ApplicationServices"

Run again

uv pip install --editable . && python examples/try.py

@Blackspyda17
Copy link

I faced this issue before and I fixed with this command:

pip install pyobjc

Then I try run it again and the missing cocoa import error disappear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants