Downloading pygame games without pygame?

前端 未结 5 458
既然无缘
既然无缘 2021-01-02 19:05

This is a simple question. I have been making a game, and I wanted some of my friends to be able to download it online. Do they have to have pygame and python installed on t

5条回答
  •  滥情空心
    2021-01-02 19:45

    Yes users need a Python interpreter and a reference to Pygame to execute your program – since your game is written in Python and uses the third party library Pygame.

    That said, you could consider to use

    • cx_Freeze,
    • pyInstaller or for example
    • py2app (for Mac users)

    to freeze your Python scripts into an executable and to make a standalone application which your friends could download and execute without having Python and / or Pygame installed on their computers.

    The Pygame wiki gives you an example how to compile a Pygame app to a standalone windows application using py2exe.

提交回复
热议问题