Error trying to install packages on Linux using Pip command [Linux]

Asked

Viewed 379 times

-2

I cannot install packages using Pip on linux, this is the error screen:

Collecting pygame
  Using cached pygame-1.9.6.tar.gz (3.2 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-sahsjreu/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-sahsjreu/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-sahsjreu/pygame/pip-egg-info
         cwd: /tmp/pip-install-sahsjreu/pygame/
    Complete output (20 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using UNIX configuration...
    
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: pkg-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    
    Hunting dependencies...
    WARNING: "sdl-config" failed!
    WARNING: "pkg-config freetype2" failed!
    WARNING: "freetype-config" failed!
    Unable to run "sdl-config". Please make sure a development version of SDL is installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.```

Anyone can help?

1 answer

0

The version of Pygame 1.9.2rc1 introduced some more dependencies and that on some platforms are not handled correctly.

Try running the code below to install these dependencies.

sudo apt install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libportmidi-dev libfreetype6-dev

Browser other questions tagged

You are not signed in. Login or sign up in order to post.