Python - running pygame

I created a simple game using Pygame. Is it possible to run this game on other computer, where Pygame is not installed? I tried to write a BATCHT file, which installs Pygame using pip. But it isn't working too.

Upvotes: 1

Views: 408

Answers (3)

Lukas Neumann
Lukas Neumann

Reputation: 656

Try auto-py-to-exe (https://pypi.org/project/auto-py-to-exe/) With this you can pack the whole thing into an exe. It supports everything above python 2.7

Upvotes: 1

CLpragmatics
CLpragmatics

Reputation: 645

Maybe you could try to build a dist, in case your target system is linux based (.rpm or .deb). You find a detailed description here:

https://docs.python.org/3/distutils/builtdist.html

Upvotes: 2

Ghantey
Ghantey

Reputation: 636

To make your game run in other computer where there is no pygame installed you need to make it executable. Following package can make your script executable:

  1. pyinstaller
  2. py2exe

Tutorial

  1. Converting to executable using pyinstaller
  2. Converting to executable using py2exe

Pyinstaller is way more easier than py2exe. But both of them works like a charm!

Upvotes: 3

Related Questions