rumps icon indicating copy to clipboard operation
rumps copied to clipboard

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

Open TheBuzzer67 opened this issue 2 years ago • 2 comments

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)

TheBuzzer67 avatar Feb 20 '23 01:02 TheBuzzer67

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

SKaplanOfficial avatar Mar 19 '23 19:03 SKaplanOfficial

The comment above (https://github.com/jaredks/rumps/issues/200#issuecomment-1475380684) solved this for me.

knurl avatar Aug 08 '23 11:08 knurl