python 模块未找到错误:没有名为'greenlet._greenlet'的模块

jvlzgdj9  于 2023-01-12  发布在  Python
关注(0)|答案(1)|浏览(1061)

我尝试使用TikTokPy,但Greenlet模块中出现错误:

$ python quickstart.py
Traceback (most recent call last):
  File "C:\Users\mngoc\tiktokpy\quickstart.py", line 2, in <module>
    from tiktokpy import TikTokPy
  File "C:/Users\mngoc\tiktokpy/tiktokpy/__init__.py", line 1, in <module>
    from .bot import TikTokPy
  File "C:/Users\mngoc\tiktokpy/tiktokpy/bot/__init__.py", line 15, in <module>
    from tiktokpy.client import Client
  File "C:/Users\mngoc\tiktokpy/tiktokpy/client/__init__.py", line 8, in <module>
    from playwright.async_api import Browser, Page, Playwright, PlaywrightContextManager, Response
  File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/async_api/__init__.py", line 25, in <module>
    import playwright.async_api._generated
  File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/async_api/_generated.py", line 25, in <module>
    from playwright._impl._accessibility import Accessibility as AccessibilityImpl
  File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/_impl/_accessibility.py", line 17, in <module>
    from playwright._impl._connection import Channel
  File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/playwright/_impl/_connection.py", line 23, in <module>
    from greenlet import greenlet
  File "C:/Users\mngoc\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages/greenlet/__init__.py", line 29, in <module>
    from ._greenlet import _C_API # pylint:disable=no-name-in-module
ModuleNotFoundError: No module named 'greenlet._greenlet'

我已经安装了Greenlet模块,但我对._greenlet一无所知,相关问题没有任何答案,所以我卡住了。

hjzp0vay

hjzp0vay1#

您应该安装模块:

pip3 install greenlet

相关问题