Page 1 of 1
No module named Appkit
Posted:
Sat Sep 10, 2022 12:51 pm
by gt3mike
I'm trying to install the Sonos plugin in an Indigo 2022.1.2 install that I've recently migrated to a new M1 Mac Mini running Mac OS 12.5.1. When the plugin starts up, I get this error:
- Code: Select all
Enabling plugin "Sonos 1.0.17" using API v2.0
Warning plugin "Sonos 1.0.17" may not be compatible with next Indigo release without an update
Starting plugin "Sonos 1.0.17" (pid 9073)
Sonos Error Error in plugin execution InitializeMain:
Traceback (most recent call last):
File "plugin.py", line 9, in <module>
File "/Library/Application Support/Perceptive Automation/Indigo 2022.1/Plugins/Sonos.indigoPlugin/Contents/Server Plugin/Sonos.py", line 26, in <module>
ImportError: No module named AppKit
Stopping plugin "Sonos 1.0.17" (pid 9073)
Stopped plugin "Sonos 1.0.17"
Any advice for getting past this? I see several references to this error in other threads, but no one responded with any suggestions to fix it.
Re: No module named Appkit
Posted:
Sat Sep 10, 2022 2:27 pm
by gt3mike
I did some Googling and see some references to AppKit as a developer toolset. Do I need to install Xcode on this new Mini? I'd rather not unless I need to, but I will if I must.
Re: No module named Appkit
Posted:
Sat Sep 10, 2022 9:26 pm
by gt3mike
I did some more Googling, and I'm wondering whether this might be related to pyobjc and the fact that Python 2.7 isn't installed on this new Mini?
Re: No module named Appkit
Posted:
Sun Sep 11, 2022 9:00 am
by gt3mike
Installing Xcode didn't fix it. And I looked in /Library/Frameworks and it appears that at least some of Python 2.7 is there. (I think I recall reading that Indigo might install Python 2.7 and 3.10?)
Anyway, I'm open to suggestions. Matt? Jay? Nick?
Re: No module named Appkit
Posted:
Sun Sep 11, 2022 2:51 pm
by gt3mike
Continuing to investigate this. It looks like I should be able to add AppKit to Python 2.7 using pip, but pip isn't included in the Python 2.7 that Indigo installed. (I'm assuming the Indigo installer installed Python 2.7). I considered installing it myself, but this announcement
viewtopic.php?f=2&t=25938&p=208723 advises against that. I know next to nothing about Python, so I don't know how to add pip other than with a Python install.
Suggestions continue to be welcome.
Re: No module named Appkit
Posted:
Sun Sep 11, 2022 3:52 pm
by FlyingDiver
You sure there's no pip2 installed?
Re: No module named Appkit
Posted:
Sun Sep 11, 2022 4:34 pm
by gt3mike
I sure don't see it. I looked in /Library/Frameworks/Python.framework/Versions/2.7/bin
- Code: Select all
mike@Mac-mini bin % ls -l
total 184
lrwxrwxr-x 1 root admin 6 Sep 9 20:51 2to3 -> 2to3-2
lrwxrwxr-x 1 root admin 8 Sep 9 20:51 2to3-2 -> 2to3-2.7
-rwxrwxr-x 1 root admin 140 Apr 19 2020 2to3-2.7
lrwxrwxr-x 1 root admin 5 Sep 9 20:51 idle -> idle2
lrwxrwxr-x 1 root admin 7 Sep 9 20:51 idle2 -> idle2.7
-rwxrwxr-x 1 root admin 138 Apr 19 2020 idle2.7
lrwxrwxr-x 1 root admin 6 Sep 9 20:51 pydoc -> pydoc2
lrwxrwxr-x 1 root admin 8 Sep 9 20:51 pydoc2 -> pydoc2.7
-rwxrwxr-x 1 root admin 123 Apr 19 2020 pydoc2.7
lrwxrwxr-x 1 root admin 7 Sep 9 20:51 python -> python2
lrwxrwxr-x 1 root admin 14 Sep 9 20:51 python-config -> python2-config
lrwxrwxr-x 1 root admin 9 Sep 9 20:51 python2 -> python2.7
lrwxrwxr-x 1 root admin 16 Sep 9 20:51 python2-config -> python2.7-config
-rwxrwxr-x 1 root admin 28640 Apr 19 2020 python2.7
-rwxrwxr-x 1 root admin 1726 Apr 19 2020 python2.7-config
lrwxrwxr-x 1 root admin 8 Sep 9 20:51 pythonw -> pythonw2
lrwxrwxr-x 1 root admin 10 Sep 9 20:51 pythonw2 -> pythonw2.7
-rwxrwxr-x 1 root admin 28656 Apr 19 2020 pythonw2.7
lrwxrwxr-x 1 root admin 9 Sep 9 20:51 smtpd.py -> smtpd2.py
-rwxrwxr-x 1 root admin 18586 Apr 19 2020 smtpd2.7.py
lrwxrwxr-x 1 root admin 11 Sep 9 20:51 smtpd2.py -> smtpd2.7.py
mike@Mac-mini bin %
I also looked in /usr/local/bin
- Code: Select all
mike@Mac-mini bin % ls -l
total 0
lrwxr-xr-x 1 root wheel 67 Sep 9 20:51 2to3 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/2to3
lrwxr-xr-x 1 root wheel 68 Sep 9 20:51 2to3-2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/2to3-2
lrwxr-xr-x 1 root wheel 70 Sep 9 20:51 2to3-2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/2to3-2.7
lrwxr-xr-x 1 root wheel 72 Sep 9 20:51 2to3-3.10 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/2to3-3.10
lrwxr-xr-x 1 root wheel 66 Sep 9 20:51 idle -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/idle
lrwxr-xr-x 1 root wheel 67 Sep 9 20:51 idle2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/idle2
lrwxr-xr-x 1 root wheel 69 Sep 9 20:51 idle2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/idle2.7
lrwxr-xr-x 1 root wheel 68 Sep 9 20:51 idle3 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/idle3
lrwxr-xr-x 1 root wheel 71 Sep 9 20:51 idle3.10 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/idle3.10
lrwxr-xr-x 1 root wheel 45 Sep 9 20:52 indigo-clean-and-zip-plugin -> /usr/local/indigo/indigo-clean-and-zip-plugin
lrwxr-xr-x 1 root wheel 29 Sep 9 20:52 indigo-host -> /usr/local/indigo/indigo-host
lrwxr-xr-x 1 root wheel 39 Sep 9 20:52 indigo-restart-plugin -> /usr/local/indigo/indigo-restart-plugin
lrwxr-xr-x 1 root wheel 30 Sep 9 20:52 indigo-start -> /usr/local/indigo/indigo-start
lrwxr-xr-x 1 root wheel 29 Sep 9 20:52 indigo-stop -> /usr/local/indigo/indigo-stop
lrwxrwxr-x 1 root admin 67 Sep 9 20:51 pip3 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/pip3
lrwxrwxr-x 1 root admin 70 Sep 9 20:51 pip3.10 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/pip3.10
lrwxr-xr-x 1 root wheel 67 Sep 9 20:51 pydoc -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc
lrwxr-xr-x 1 root wheel 68 Sep 9 20:51 pydoc2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc2
lrwxr-xr-x 1 root wheel 70 Sep 9 20:51 pydoc2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc2.7
lrwxr-xr-x 1 root wheel 69 Sep 9 20:51 pydoc3 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/pydoc3
lrwxr-xr-x 1 root wheel 72 Sep 9 20:51 pydoc3.10 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/pydoc3.10
lrwxr-xr-x 1 root wheel 68 Sep 9 20:51 python -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python
lrwxr-xr-x 1 root wheel 75 Sep 9 20:51 python-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-config
lrwxr-xr-x 1 root wheel 69 Sep 9 20:51 python2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2
lrwxr-xr-x 1 root wheel 76 Sep 9 20:51 python2-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2-config
lrwxr-xr-x 1 root wheel 71 Sep 9 20:51 python2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
lrwxr-xr-x 1 root wheel 78 Sep 9 20:51 python2.7-config -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config
lrwxr-xr-x 1 root wheel 70 Sep 9 20:51 python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3
lrwxr-xr-x 1 root wheel 77 Sep 9 20:51 python3-config -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3-config
lrwxr-xr-x 1 root wheel 78 Sep 9 20:51 python3-intel64 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3-intel64
lrwxr-xr-x 1 root wheel 73 Sep 9 20:51 python3.10 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10
lrwxr-xr-x 1 root wheel 80 Sep 9 20:51 python3.10-config -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10-config
lrwxr-xr-x 1 root wheel 81 Sep 9 20:51 python3.10-intel64 -> ../../../Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10-intel64
lrwxr-xr-x 1 root wheel 69 Sep 9 20:51 pythonw -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw
lrwxr-xr-x 1 root wheel 70 Sep 9 20:51 pythonw2 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2
lrwxr-xr-x 1 root wheel 72 Sep 9 20:51 pythonw2.7 -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7
lrwxr-xr-x 1 root wheel 70 Sep 9 20:51 smtpd.py -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/smtpd.py
lrwxr-xr-x 1 root wheel 73 Sep 9 20:51 smtpd2.7.py -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/smtpd2.7.py
lrwxr-xr-x 1 root wheel 71 Sep 9 20:51 smtpd2.py -> ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/smtpd2.py
mike@Mac-mini bin %
Pip3 is there -- but I installed Python 3.1 manually in order to get aiobafi6 running (before I knew I wasn't supposed to do that) . I don't think the Indigo install included it with 3.10 either. But I'm not positive about that.
Re: No module named Appkit
Posted:
Mon Sep 12, 2022 9:38 am
by jay (support)
There is definitely something wrong with that python 2 install. This is what I see:
- Code: Select all
Last login: Thu Sep 1 19:24:46 on ttys000
TinyMac:~ admin$ cd /Library/Frameworks/Python.framework/Versions/2.7/bin/
TinyMac:bin admin$ ls -la
total 264
drwxrwxr-x 33 root admin 1056 Jun 14 17:45 .
drwxrwxr-x 12 root admin 384 Jun 14 17:45 ..
lrwxr-xr-x 1 root admin 6 Jun 14 17:45 2to3 -> 2to3-2
lrwxr-xr-x 1 root admin 8 Jun 14 17:45 2to3-2 -> 2to3-2.7
-rwxrwxr-x 1 root admin 140 Apr 19 2020 2to3-2.7
-rwxrwxr-x 1 root admin 309 May 3 10:02 easy_install
-rwxrwxr-x 1 root admin 309 May 3 10:02 easy_install-2.7
-rwxrwxr-x 1 root admin 295 May 3 10:04 f2py
-rwxrwxr-x 1 root admin 295 May 3 10:04 f2py2
-rwxrwxr-x 1 root admin 295 May 3 10:04 f2py2.7
-rwxrwxr-x 1 root admin 460 May 3 10:04 futurize
lrwxr-xr-x 1 root admin 5 Jun 14 17:45 idle -> idle2
lrwxr-xr-x 1 root admin 7 Jun 14 17:45 idle2 -> idle2.7
-rwxrwxr-x 1 root admin 138 Apr 19 2020 idle2.7
-rwxrwxr-x 1 root admin 464 May 3 10:04 pasteurize
-rwxrwxr-x 1 root admin 291 May 3 10:03 pip
-rwxrwxr-x 1 root admin 291 May 3 10:03 pip2
-rwxrwxr-x 1 root admin 291 May 3 10:03 pip2.7
lrwxr-xr-x 1 root admin 6 Jun 14 17:45 pydoc -> pydoc2
lrwxr-xr-x 1 root admin 8 Jun 14 17:45 pydoc2 -> pydoc2.7
-rwxrwxr-x 1 root admin 123 Apr 19 2020 pydoc2.7
lrwxr-xr-x 1 root admin 7 Jun 14 17:45 python -> python2
lrwxr-xr-x 1 root admin 14 Jun 14 17:45 python-config -> python2-config
lrwxr-xr-x 1 root admin 9 Jun 14 17:45 python2 -> python2.7
lrwxr-xr-x 1 root admin 16 Jun 14 17:45 python2-config -> python2.7-config
-rwxrwxr-x 1 root admin 28640 Apr 19 2020 python2.7
-rwxrwxr-x 1 root admin 1726 Apr 19 2020 python2.7-config
lrwxr-xr-x 1 root admin 8 Jun 14 17:45 pythonw -> pythonw2
lrwxr-xr-x 1 root admin 10 Jun 14 17:45 pythonw2 -> pythonw2.7
-rwxrwxr-x 1 root admin 28656 Apr 19 2020 pythonw2.7
lrwxr-xr-x 1 root admin 9 Jun 14 17:45 smtpd.py -> smtpd2.py
-rwxrwxr-x 1 root admin 18586 Apr 19 2020 smtpd2.7.py
lrwxr-xr-x 1 root admin 11 Jun 14 17:45 smtpd2.py -> smtpd2.7.py
I think you should delete the
/Library/Frameworks/Python.framework/Versions/2.7/ directory then rerun the Indigo installer. We install pyobjc as part of the install process and that's what enables the AppKit import, so clearly the installer didn't get run correctly.
Re: No module named Appkit
Posted:
Mon Sep 12, 2022 10:04 am
by gt3mike
That fixed it. Now my Python 2.7 directory looks like yours and the plugin runs. Thanks!
I have no idea how this happened. The Indigo installer didn't complain about anything the first time it ran.
Re: No module named Appkit
Posted:
Tue Sep 13, 2022 6:48 am
by Bleasel
That worked for me as well.