ModuleNotFoundError: No module named 'Quartz' on Mac
See original GitHub issueThe dependency (pyobjc
) is not being installed as part of pip install keyboard
:
$ python3 -m venv venv_keyboard
$ source venv_keyboard/bin/activate
(venv_keyboard) $ pip install keyboard
Collecting keyboard
Using cached keyboard-0.11.0-py2.py3-none-any.whl
Installing collected packages: keyboard
Successfully installed keyboard-0.11.0
(venv_keyboard) $ python
Python 3.6.4 (default, Mar 1 2018, 18:36:50)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import keyboard
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/jakubczaplicki/PycharmProjects/venv_keyboard/lib/python3.6/site-packages/keyboard/__init__.py", line 103, in <module>
from. import _darwinkeyboard as _os_keyboard
File "/Users/jakubczaplicki/PycharmProjects/venv_keyboard/lib/python3.6/site-packages/keyboard/_darwinkeyboard.py", line 3, in <module>
import Quartz
ModuleNotFoundError: No module named 'Quartz'
>>>
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
ModuleNotFoundError: No module named 'Quartz'
I'm trying to work on python3 and using mac. I have installed pyobjc-core and pyobjc, but the error said Quartz not found.
Read more >ImportError: No module named Quartz - Mac OSX #13 - GitHub
Hm running objc from the python command line seems fine I think? /usr/local/bin/python. import objc print dir(objc). ['Accessor ...
Read more >No module named Quartz - Workflow Help & Questions
I am using a Python Script that someone else wrote to control the macOS Media keys for music playback. It stopped working in...
Read more >pyobjc-framework-Quartz - PyPI
Wrappers for the “Quartz” related frameworks on macOS. These frameworks provide a number of graphics related API's. The frameworks wrapped by this package...
Read more >“import Quartz” or “import CoreGraphics” - PyObjC
“import CoreGraphics”. Apple ships a module named CoreGraphics that provides bindings for a large subset of the CoreGraphics API. · “import Quartz”. PyObjC...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Found the problem. The
setuptools
package on the system used to build the release was outdated (Windows pip vs Windows-Ubuntu pip), and the result was unconditional dependencies. More details in the commit message: 083b78fI’m finishing some changes and will release a new-new version with the dependency declaration correct. I’m keeping the issue open until then, since it can’t be really fixed until a release is launched.
Sorry for the absolute mess.
Note I had to undo https://github.com/boppreh/keyboard/blob/6f9961f2589cf37749239acf938a7e40ae9e9a21/setup.py#L34 because it broke installation on Windows and Linux (#143).