您好,当我尝试运行时,我现在PyObjC-core是我的requirements.txt文件中的依赖项之一
pip install -r requirements.txt
它返回以下错误:
SpreadsheetApp.getActive().getSheets();
我在网上寻找解决方案,但仍然找不到任何答案。
我的pip版本是20.0.2,并且在python 3.7上运行
我也尝试过手动安装Collecting pyobjc-core==6.1
Using cached https://files.pythonhosted.org/packages/3a/80/0cdb2130b86a984e4765beb93135aa9c2120fd64be1a27e1c7cb31c719bc/pyobjc-core-6.1.tar.gz
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vj52r5i1/pyobjc-core/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vj52r5i1/pyobjc-core/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-vj52r5i1/pyobjc-core/pip-egg-info
cwd: /tmp/pip-install-vj52r5i1/pyobjc-core/
Complete output (2 lines):
running egg_info
error: PyObjC requires macOS to build
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
,但还是没有运气
答案 0 :(得分:0)
如此处https://github.com/asweigart/pyautogui/issues/381所述,我相信当前唯一的解决方案是安装pyautogui的旧版本: https://pypi.org/project/PyAutoGUI/0.9.50/#history。
例如:pip3 install PyAutoGUI == 0.9.48