How to install Pygame in Python3 on Kali Linux

step 1. pygame installing all necessary dependencies

 python3-dev 
 python3-numpy 
 libsdl-dev 
 libsdl-image1.2-dev 
 libsdl-mixer1.2-dev 
 libsdl-ttf2.0-dev 
 libsmpeg-dev 
 libportmidi-dev 
 libavformat-dev 
 libswscale-dev
 libjpeg-dev
 libfreetype6-dev

run install command

sudo apt-get install python3-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev checkinstall mercurial



step 2. download the latest version of the Pygame source code

hg clone https://bitbucket.org/pygame/pygame


step 3. go into the downloaded Pygame directory and Build

python3 setup.py build


install Pygame

sudo python3 setup.py install


SHARE

About Lasha Gogua

    Blogger Comment
    Facebook Comment

2 comments:

  1. Traceback (most recent call last):
    File "setup.py", line 109, in
    from setuptools import setup, find_packages
    ImportError: No module named 'setuptools'

    after
    python3 setup.py build

    WARNING, No "Setup" File Exists, Running "config.py"
    Using UNIX configuration...


    Hunting dependencies...
    sh: 1: freetype-config: not found
    sh: 1: freetype-config: not found
    sh: 1: freetype-config: not found
    WARNING: "freetype-config" failed!

    after
    python setup.py install

    ReplyDelete
  2. Hey mate, how did you modify the shell apperance?

    ReplyDelete