include pygame in your program

2019-08-04 16:01发布

I'm about to finish a program which uses Pygame, which means you would need to install Python and Pygame in order to run the game. How can I include Python and Pygame in the program itself, or is there an easy way to make an installer for the game?

2条回答
劫难
2楼-- · 2019-08-04 16:18

py2exe seems to be a popular answer, and I would suggest looking into it as well. I would also suggest trying pyinstaller. The setup is a bit more involved, but the tutorials are great.

查看更多
该账号已被封号
3楼-- · 2019-08-04 16:29

Like PygameNerd said, I would suggest looking into py2exe. I wrote a game for a game jam and wanted to distribute it to people in my dorm. I used py2exe to load it up and distribute it pretty effortlessly (especially using Pygame).

Check out the py2exe website as well as this link on working with various modules in your package. I had dependencies with wxPython and used the latter guide to much success.

查看更多
登录 后发表回答