我正在尝试在python3上使用Mac。我已经安装了pyobjc-core和pyobjc,但未显示错误Quartz。我对这种安装非常陌生。有什么解决办法吗?这是我来自pycharm的错误:Traceback (most recent call last): File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module> import QuartzModuleNotFoundError: No module named 'Quartz'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/Users/Thyme/PycharmProjects/DinosourBot/Bot.py", line 2, in <module> import pyautogui File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/__init__.py", line 110, in <module> from . import _pyautogui_osx as platformModule File "/Users/Thyme/PycharmProjects/DinosourBot/venv/lib/python3.6/site-packages/pyautogui/_pyautogui_osx.py", line 7, in <module> assert False, "You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.html"AssertionError: You must first install pyobjc-core and pyobjc: https://pyautogui.readthedocs.io/en/latest/install.htmlProcess finished with exit code 1
3 回答
交互式爱情
TA贡献1712条经验 获得超3个赞
我建议最好安装所有的pyObjC,而不是仅安装特定的框架。始终,如果您正在使用Quartz,那么至少将需要各种CoreFoundation对象和常量。更不用说AppKit或其他框架了,这取决于您在做什么。
pip install pyobjc
(或pip3
)应该安装一切并让您import Quartz
。(它对我来说适用于几个python!)
添加回答
举报
0/150
提交
取消