Python ModuleNotFoundError:没有名为"symbol"的模块。多森特存在



我在运行时得到这个:

Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/_pyautogui_osx.py", line 5, in <module>
import Quartz
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Quartz/__init__.py", line 6, in <module>
import AppKit
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/AppKit/__init__.py", line 10, in <module>
import Foundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Foundation/__init__.py", line 9, in <module>
import CoreFoundation
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/CoreFoundation/__init__.py", line 9, in <module>
import objc
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/__init__.py", line 29, in <module>
from ._bridgesupport import *  # noqa: F401, F403, E402
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/objc/_bridgesupport.py", line 15, in <module>
import pkg_resources
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources.py", line 29, in <module>
import symbol
ModuleNotFoundError: No module named 'symbol'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/williamgiles/Desktop/wart/client/wart.py", line 2, in <module>
import pyautogui
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyautogui/__init__.py", line 544, in <module>
from . import _pyautogui_osx as platformModule
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/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

一个小时前,一切都没有改变。我很困惑。

我试过pip3 install symbol,但它不起作用。

此错误可能意味着您没有安装模块符号。我知道pip3安装符号不起作用,但考虑到其他例外情况,您需要pip3安装pyobjc-core和pyobjc。

为了解决符号安装问题:根据我所做的研究,你想要的模块可能被称为symbol-release,而不仅仅是符号。

最新更新