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

AppKit depreciated - ImportError: cannot import name 'NSApplication' from 'AppKit' #200

Open
TheBuzzer67 opened this issue Feb 20, 2023 · 2 comments

Comments

@TheBuzzer67
Copy link

Is there someone working to update the AppKit issues

import rumps
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/rumps/init.py", line 26, in
from .rumps import (separator, debug_mode, alert, application_support, timers, quit_application, timer,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/rumps/rumps.py", line 15, in
from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, NSAlert, NSTextField, NSSecureTextField, NSImage, NSSlider, NSSize, NSWorkspace, NSWorkspaceWillSleepNotification, NSWorkspaceDidWakeNotification
ImportError: cannot import name 'NSApplication' from 'AppKit' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/AppKit/init.py)

@SKaplanOfficial
Copy link
Contributor

There's a pip module called AppKit that has no relation to PyObjC that, if installed, would cause this issue. If you haven't solved it already (or for others who come across this issue in the future), uninstall AppKit and force reinstall PyObjC-core, i.e.:
pip uninstall AppKit
then
pip install --upgrade --force-reinstall PyObjC PyObjC-core

@knurl
Copy link

knurl commented Aug 8, 2023

The comment above (#200 (comment)) solved this for me.

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

3 participants