There is a package (python-pygame) for Python2 available from the universe repository. However, I want to work through the tutorial in the Invent with Python book. Going through SPM (Synaptic), I cannot find a pygame resource for Python3.
Also, I looked on the Pygame website and it is not clear if Pygame is available for Python3 (though the book indicates that it is).
Can someone help me with my dilemma?
From Pygame wiki:
However, there seems no pre-packaged Pygame packages for Python 3 in Ubuntu repositories, at least as of 14.04.
I would suggest you to get the source packages from the pygame website and install it locally into a virtualenv or buildout. Globally installing python modules in evil anyway :) Here are the instructions: http://www.pygame.org/wiki/CompileUbuntu
Alternatively you can try this PPA: https://launchpad.net/~thopiekar/+archive/ubuntu/pygame
Someone needs to make a
python3-pygame
package that does this, but no one has yetJust use the below command to install pygame for Python3.
It could install pygame correctly on Ubuntu 16.04 and Python Python 3.5.2.
Thanks again to everyone.
Just did a clean install of Mint 18 Cinnamon 64bit, and was following TheGeek61's post above to get Pygame working again.
But when I tried
python3 setup.py build
came up with an error:After some searching, ran the following:
Which then allowed Pygame for Python3 to install successfully.
The pre-requisite packages right now on the Mavproxy wiki will not work with Raspbian :
sudo apt-get install python3-dev python3-opencv python3-wxgtk3.0 python3-pip python3-matplotlib python3-pygame python3-lxml python3-yaml
Instead you will need to use the old one :