Pygame with Fedora and Python 3


I’m having some fun with pygame, a library to create games in Python.

The exact steps to follow to have pygame in Python 3 on Fedora Linux are detailed in the Python Fun blog. In essence:

  • yum install python3 python3-tools python3-devel
  • yum install SDL SDL-devel portmidi portmidi-devel ffmpeg ffmpeg-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel libjpeg-turbo-devel
  • cd /usr/lib64 && ln -s

This takes care of all dependencies needed (minus smpeg which does not exist in recent Fedora Linux distributions). Then:

  • Get the pygame source code (e.g. hg clone
  • python3
  • python3 build
  • python3 install

That’s it! Test by running python3 and importing pygame.

Have fun creating games ;-)


  1. A brief note to myself:

    To create a virtual environment using Python 3, issue:

    mkvirtualenv –python=`which python3` name_of_project

    then use pip3 to install modules.

Speak Your Mind