我没有使用 PyInstaller 将 PyGame 游戏打包到 .exe 中,而是尝试使用新的 Python 库 pygbag 通过 Web 程序集打包游戏,以便在 itch.io 等网站上共享。
我按照教程尝试在浏览器的端口 8000 上进行本地测试... 1) 将 asyncio 代码插入我的游戏代码 2) 从指定目录的终端运行 pygbag。
Pygbag 执行了一些构建,但随后遇到了此 SSL 错误。有什么想法吗?谢谢。
警告:web.get( https://pygame-web.github.io/archives/0.5/default.tmpl ) :
在 MacOS 11.6.7 上; Python 3.10.8; pygbag 0.5.0; pygame 2.1.2
ctrl-c 退出,我看到另一个 SSL 错误:
警告:web.get( https://pygame-web.github.io/archives/0.5/favicon.png ) :
crtl-c 再次退出会使其完全停止。
最佳答案
Applications/Python 3.10/中有一个“Install Certificates.command”文件。我双击运行它,这解决了我的问题。
certificate verify failed: unable to get local issuer certificate
关于ssl - 使用 pygbag 打包 PyGame for web 导致 SSL 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74876585/