Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3: how to install pygame?

I have been trying to install pygame for 3.3 and 3.4 and can't find a way to install it probably with out it giving a error when I do pygame.init().

Is it because pygame.init() is not the proper code or is it because I installed it incorrectly? If so, can someone tell me how to install it?

like image 338
user3545299 Avatar asked Apr 17 '14 12:04

user3545299


People also ask

How do I import pygame into Python 3?

Open a terminal, and type 'sudo apt-get install idle pygame', enter your password and type 'y' at the prompts, if necessary. 2. After the installation completes, enter 'python' in the terminal to launch Python. Verify that it's using version 2.7 or newer, then at the Python prompt enter 'import pygame'.

Does Python 3 come with pygame?

Pygame does not come with Python. Like Python, Pygame is available for free. You will have to download and install Pygame, which is as easy as downloading and installing the Python interpreter.

Can I pip install pygame?

Pygame InstallationThe best way to install pygame is with the pip tool (which is what python uses to install packages). Note, this comes with python in recent versions. We use the --user flag to tell it to install into the home directory, rather than globally. If it works, you are ready to go!


1 Answers

You can find binary installations for pygame for python 3.4 on windows here. I'm not sure where you could find it if you're running a different operating system.

like image 52
user3002473 Avatar answered Sep 23 '22 07:09

user3002473