python - 尝试使用 python3 导入 pyautogui 时出错
问题描述
```在此处输入代码So I installed
pyautogui` 但我在导入它时遇到了问题:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/Quartz/__init__.py", line 5, in <module>
import objc
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/objc/__init__.py", line 32, in <module>
from objc._bridgesupport import *
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/objc/_bridgesupport.py", line 13, in <module>
import pkg_resources
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 36, in <module>
import email.parser
ModuleNotFoundError: No module named 'email.parser'; 'email' is not a package
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pyautogui/__init__.py", line 110, in <module>
from . import _pyautogui_osx as platformModule
File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/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.html
好的,我尝试安装pyobjc-core
,pyobjc
但我又遇到了同样的问题,我也不明白为什么有对电子邮件包的引用```
body
{
background-color:gray;
}
解决方案
推荐阅读
- sql - Oracle SQL:如何在不同的组中分组相同的值
- c# - Rasa 在短语中获取一些关键字并返回自定义行
- database - 从 dbbrowser 中的 geopackage 中为 sqlite 选择几何
- cups - CUPS 打印服务器上的 Dymo LabelWriter Wireless - 无法正常工作
- reactjs - 如何在 React-Router-dom 中删除或更改历史记录?
- bash - Docker 运行找不到 ENTRYPOINT
- python - 当用户在 PyQt5 中的 QMessageox 上输入 Ok 时,如何不结束程序?
- java - 如何在 OSGi(Karaf)模块中添加 GraalVM 多语言代码(运行 Javascript 的 Java)支持
- r - R中是否有一种有效的方法来搜索和替换小标题中多个字符串中的单词?
- oracle - flyway maven找不到oracle.jdbc.OracleDriver