LINUX.ORG.RU
Ответ на: комментарий от th3m3

В Виндовс пробую с версией 3.6, ориентируясь на документацию: https://requests.readthedocs.io/projects/requests-html/en/latest/

C:\Python36>python
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from requests_html import HTMLSession
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36\lib\site-packages\requests_html.py", line 9, in <module>
    import pyppeteer
  File "C:\Python36\lib\site-packages\pyppeteer\__init__.py", line 30, in <module>
    from pyppeteer.launcher import connect, launch, executablePath  # noqa: E402
  File "C:\Python36\lib\site-packages\pyppeteer\launcher.py", line 24, in <module>
    from pyppeteer.browser import Browser
  File "C:\Python36\lib\site-packages\pyppeteer\browser.py", line 13, in <module>
    from pyppeteer.connection import Connection
  File "C:\Python36\lib\site-packages\pyppeteer\connection.py", line 12, in <module>
    import websockets
  File "C:\Python36\lib\site-packages\websockets\__init__.py", line 3, in <module>
    from .auth import *
  File "C:\Python36\lib\site-packages\websockets\auth.py", line 15, in <module>
    from .server import HTTPResponse, WebSocketServerProtocol
  File "C:\Python36\lib\site-packages\websockets\server.py", line 49, in <module>
    from .protocol import WebSocketCommonProtocol
  File "C:\Python36\lib\site-packages\websockets\protocol.py", line 18, in <module>
    from typing import (
ImportError: cannot import name 'Deque'
>>> from requests_html import AsyncHTMLSession
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python36\lib\site-packages\requests_html.py", line 9, in <module>
    import pyppeteer
  File "C:\Python36\lib\site-packages\pyppeteer\__init__.py", line 30, in <module>
    from pyppeteer.launcher import connect, launch, executablePath  # noqa: E402
  File "C:\Python36\lib\site-packages\pyppeteer\launcher.py", line 24, in <module>
    from pyppeteer.browser import Browser
  File "C:\Python36\lib\site-packages\pyppeteer\browser.py", line 13, in <module>
    from pyppeteer.connection import Connection
  File "C:\Python36\lib\site-packages\pyppeteer\connection.py", line 12, in <module>
    import websockets
  File "C:\Python36\lib\site-packages\websockets\__init__.py", line 3, in <module>
    from .auth import *
  File "C:\Python36\lib\site-packages\websockets\auth.py", line 15, in <module>
    from .server import HTTPResponse, WebSocketServerProtocol
  File "C:\Python36\lib\site-packages\websockets\server.py", line 49, in <module>
    from .protocol import WebSocketCommonProtocol
  File "C:\Python36\lib\site-packages\websockets\protocol.py", line 18, in <module>
    from typing import (
ImportError: cannot import name 'Deque'
>>>
lemonia
() автор топика

Чёт по скрину нифига не понятно как оно должно работать. Ты где-то ещё loop открываешь? Потому что это только через asyncio.run и подобное можно пустить

upcFrost ★★★★★
()

Начинать программирование на Python лучше с синхронного программирования.

emorozov
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.