Skip to main content
 首页 » 编程设计

python之尝试安装 pyautogui 时出错

2024年10月01日43yyy_WW

我正在尝试通过 pip 安装 pytautogui,但一直遇到问题。这是在 Mac 上。我试过在 python 2.7 和 3.6.1 下运行命令,但没有成功。

Complete output from command python setup.py egg_info: 
Traceback (most recent call last): 
  File "<string>", line 1, in <module> 
  File "/private/var/folders/sz/62b931pd5zjbclx2fzpkww1w0000gn/T/pip-build-0vb25t/pyautogui/setup.py", line 6, in <module> 
    version=__import__('pyautogui').__version__, 
  File "pyautogui/__init__.py", line 110, in <module> 
    from . import _pyautogui_osx as platformModule 
  File "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.html 

我在这里遗漏了什么,我已经安装了 pyobjc-core 但没有修复它?这看起来像是 pyautogui 安装程序的问题吗?

感谢您的帮助。

请您参考如下方法:

在这样的问题上你应该:

  1. 检查您安装的 pyobjc 版本是否与您的 python 版本兼容。
  2. 检查是否安装了两个必需的包(pyobjc、pyobjc-core)