# NotImplementedError: 此事件循环不支持数据报端点

- **ID:** `python/asyncio-datagram-endpoint-not-supported`
- **领域:** python
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

在 ProactorEventLoop（Windows 默认）上调用了 create_datagram_endpoint()，它不支持 UDP 数据报。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.8+ | active | — | — |
| 3.9+ | active | — | — |
| 3.10+ | active | — | — |
| 3.11+ | active | — | — |
| 3.12+ | active | — | — |

## 解决方案

1. **** (95% 成功率)
   ```
   import asyncio, sys
if sys.platform == 'win32':
    asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
asyncio.run(main())
   ```
2. **** (90% 成功率)
   ```
   import uvloop
uvloop.install()
asyncio.run(main())
   ```

## 无效尝试

- **** — The loop type does not change; retry raises the same error. (95% 失败率)
- **** — Loses async semantics and does not integrate with the loop's datagram protocol. (70% 失败率)
