安装python aiortc模块在msys2 mingw-64



我正在尝试在msys2环境中安装aiortc模块。

(尝试使用几种方法(pip, python -m pip, git clone,…)尝试由于30000个字符限制而删除)

问题在于lvpxmt库无法在msys平台上使用pacman命令。

编辑:我找到了一个解决方案,但没有稳定的,所以我需要你的帮助,一个更好的解决方案:

  1. 我修改https://github.com/aiortc/aiortc/blob/main/src/_cffi_src/build_vpx.py
'''
if sys.platform == "win32":
libraries = ["vpxmt"]
else:
libraries = ["vpx"]
'''
libraries = ["vpx"]
  1. 我从msys终端运行pacman -S mingw-w64-x86_64-libvpx

  2. 然后git clone, python setup.py build和python setup.py install.

执行以上步骤后,可以成功导入aiortc模块。

问题是当我运行一个应用程序,我做,当一个连接请求,然后这里是错误。

$ python "Papinhio_player.py"
======== Running on http://192.168.1.20:8080 ========
(Press CTRL+C to quit)
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
INFO: Connection(0) Remote candidate "bad08d5c-a247-46af-9354-db284c66382a.local
" could not be resolved
INFO: Connection(0) Remote candidate "5e511bd8-9188-49ac-b81a-43948ff41e3e.local
" could not be resolved
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
INFO: Connection(0) Check CandidatePair(('192.168.1.20', 55814) -> ('94.67.45.23
8', 55812)) State.FROZEN -> State.WAITING
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('94.67.45.238
', 55812)) State.FROZEN -> State.WAITING
INFO: Connection(0) Check CandidatePair(('192.168.1.20', 55814) -> ('94.67.45.23
8', 55812)) State.WAITING -> State.IN_PROGRESS
INFO: Connection(0) Discovered peer reflexive candidate Candidate(gjhrDZjUZ2 1 u
dp 1845504255 2a02:587:4b01:cb00:55a5:20c2:3fa6:d4e8 55813 typ prflx)
INFO: Connection(0) Check CandidatePair(('2a02:587:4b01:cb00:55a5:20c2:3fa6:d4e8
', 55815) -> ('2a02:587:4b01:cb00:55a5:20c2:3fa6:d4e8', 55813)) State.WAITING ->
State.IN_PROGRESS
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('94.67.45.238
', 55812)) State.WAITING -> State.IN_PROGRESS
INFO: Connection(0) Discovered peer reflexive candidate Candidate(MmDQaPhURm 1 u
dp 1845504255 2a02:587:4b01:cb00:21e9:4ebb:b1bc:d885 55813 typ prflx)
INFO: Connection(0) Check CandidatePair(('2a02:587:4b01:cb00:21e9:4ebb:b1bc:d885
', 55816) -> ('2a02:587:4b01:cb00:21e9:4ebb:b1bc:d885', 55813)) State.WAITING ->
State.IN_PROGRESS
INFO: Connection(0) Discovered peer reflexive candidate Candidate(rLAuRJolEm 1 u
dp 1845504255 2a02:587:4b01:cb00:c5:9a05:88d5:5216 55813 typ prflx)
INFO: Connection(0) Check CandidatePair(('2a02:587:4b01:cb00:c5:9a05:88d5:5216',
55818) -> ('2a02:587:4b01:cb00:c5:9a05:88d5:5216', 55813)) State.WAITING -> Sta
te.IN_PROGRESS
INFO: Connection(0) Discovered peer reflexive candidate Candidate(bk4YdRMUJm 1 u
dp 1845504255 2a02:587:4b01:cb00:35b5:b57c:da87:91d4 55813 typ prflx)
INFO: Connection(0) Check CandidatePair(('2a02:587:4b01:cb00:35b5:b57c:da87:91d4
', 55819) -> ('2a02:587:4b01:cb00:35b5:b57c:da87:91d4', 55813)) State.WAITING ->
State.IN_PROGRESS
INFO: Connection(0) Discovered peer reflexive candidate Candidate(a8E4PNjgmF 1 u
dp 1845501695 192.168.1.20 55812 typ prflx)
INFO: Connection(0) Check CandidatePair(('192.168.1.20', 55814) -> ('192.168.1.2
0', 55812)) State.WAITING -> State.IN_PROGRESS
INFO: Connection(0) Check CandidatePair(('192.168.1.20', 55814) -> ('192.168.1.2
0', 55812)) State.IN_PROGRESS -> State.SUCCEEDED
INFO: Connection(0) ICE completed
ERROR: Exception in callback _ProactorDatagramTransport._loop_reading(<_Overlapp
edF...1.20', 5353))>)
handle: <Handle _ProactorDatagramTransport._loop_reading(<_OverlappedF...1.20',
5353))>)>
Traceback (most recent call last):
File "C:/msys64/mingw64/lib/python3.8/asyncio/events.py", line 81, in _run
self._context.run(self._callback, *self._args)
File "C:/msys64/mingw64/lib/python3.8/asyncio/proactor_events.py", line 578, i
n _loop_reading
self._protocol.datagram_received(data, addr)
File "C:/msys64/mingw64/lib/python3.8/site-packages/aioice/mdns.py", line 55,
in datagram_received
if isinstance(message, dns.message.QueryMessage):
AttributeError: module 'dns.message' has no attribute 'QueryMessage'
INFO: Connection(0) Discovered peer reflexive candidate Candidate(Zmrv1yIrFq 1 u
dp 1845501695 192.168.1.5 55812 typ prflx)
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('192.168.1.5'
, 55812)) State.WAITING -> State.FAILED
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('192.168.1.5'
, 55812)) State.FAILED -> State.IN_PROGRESS
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('192.168.1.5'
, 55812)) State.IN_PROGRESS -> State.IN_PROGRESS
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('192.168.1.5'
, 55812)) State.IN_PROGRESS -> State.SUCCEEDED
INFO: Connection(0) Check CandidatePair(('192.168.1.5', 55817) -> ('192.168.1.5'
, 55812)) State.SUCCEEDED -> State.SUCCEEDED
ERROR: Task was destroyed but it is pending!
task: <Task pending name='Task-44' coro=<RequestHandler.start() done, defined at
C:/msys64/mingw64/lib/python3.8/site-packages/aiohttp-4.0.0a1-py3.8-mingw.egg/a
iohttp/web_protocol.py:437> wait_for=<Future pending cb=[<TaskWakeupMethWrapper
object at 0x000002907d437a00>()]>>

我不相信这是应用程序错误,因为完全相同的应用程序在不同的环境(不同于msys)中运行没有错误。

那么,我如何解决这个错误?如果需要,我可以提供我运行的aiortc应用程序代码。

看来谷歌今天(2021年8月30日)发布的google-crc32c 1.1.3更新有问题。几天前,我有一个构建工作,开始失败,在github操作上出现了完全相同的错误。我通过返回到1.1.2解决了这个问题,它可以正常工作。

我建议你试试

pip install google-crc32c==1.1.2 aiortc

这应该会给你一个crc32的工作版本。

相关内容

  • 没有找到相关文章

最新更新