📌 📄 内容摘要:
xy3 在 windows11 python无法进入协程? 中发帖
我的迷你主机拿去修了,用了旧的笔记本,安装uv最新版,然后发现协程无法进入
File: 1.py
import asyncio
import sys
async def test():
print("test")
if __name__ == "__main__":
# 在 Windows 上强制使用默认的事件循环策略
if sys.platform == "win32":
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
print("running test...")
asyncio.run(test())
(2) PS D:\proj\2> uv run 1.py
running test…
(2) PS D:\p...
────────── 链接信息 ────────── 🔗 论坛链接: linux.do 📎 访问地址: https://linux.do/t/topic/1082423/1 ─────────────────────────────
📢 来源:LINUX DO