赞
踩
本文部分内容摘抄
PyUserInput在macOS中的安装(解决Quartz和AppKit安装的神坑!!)_Devin13的博客-CSDN博客
PyUserInput在macOS中的安装(解决Quartz和AppKit安装的神坑!!)
安装步骤
1> 先下载 quartz
2> 提取后找到setup.py文件,找到以下行:
install_requires=read_dependencies(“requirements.txt")
将其修改为:
install_requires=read_dependencies("quartz.egg-info/requires.txt")
3> 回到quartz-0.0.1.dev0文件的父级目录,运行以下命令:
pip install -e quartz-0.0.1.dev0
2. 安装AppKit,其实是PyObjC PyObjC-core
sudo pip install --upgrade --force-reinstall PyObjC PyObjC-core
3. 最后安装 pip install PyUserInput
Questions:
1. 在最开始没有安装 quartz 和PyObjC PyObjC-core 之前,只安装了PyUserInput 运行脚本报如下错误
raise RuntimeError('There is no current event loop in thread %!r(MISSING).'
RuntimeError: There is no current event loop in thread 'ThreadPoolExecutor-0_0'.
解决问题:
重新安装 步骤1 和2
quartz 和PyObjC PyObjC-core
2. 在安装了quart 和PyObjC 后运行程序报错,
import PyObjCTools.KeyValueCoding as kvc
ModuleNotFoundError: No module named 'PyObjCTools.KeyValueCoding'
重新执行脚本即可解决 : sudo pip install --upgrade --force-reinstall PyObjC PyObjC-core
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。