Error with installing pygame with pip

◇◆丶佛笑我妖孽 提交于 2020-01-30 10:52:31

问题


The following is the EXACT output when running the command sudo python -m pip install pygame on raspberry pi:

Collecting pygame
  Using cached pygame-1.9.3.tar.gz
    Complete output from command python setup.py egg_info:


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


    Hunting dependencies...
    SDL     : found 1.2.15
    FONT    : found
    IMAGE   : found
    MIXER   : found
    PNG     : found
    JPEG    : found
    SCRAP   : found
    PORTMIDI: not found
    PORTTIME: not found
    FREETYPE: found 2.5.2
    Missing dependencies

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-nOupZN/pygame/

I have tried installing pygame in ways without using pip but all of them fail in other ways and I think this problem may be the easiest to fix. I don't mind the missing dependencies. I know error code 1 is "operation not permitted" error, but i did use sudo, so I don't know why this comes up. I apologize for having so much code, but I wanted to provide as much information as possible. I have no idea what the problem is, but if anyone can help it would be a lifesaver.

Notes:

  • The last line of the output appears in red text in the shell
    • nOupZN is probably just random; I've tried installing multiple times and that part changes each time
  • I am using python 2.7.9 and do not wish to switch
  • I have recently upgraded pip
  • The error still occurs even when using the --user flag
  • The error still occurs even when running sudo su beforehand

回答1:


sudo apt-get install python3-pygame

I've been struggling to learn the right way to install stuff on my Pi too. I've just started this past year, and pretty much new to linux. I've converged on this technique working most of the time.



来源:https://stackoverflow.com/questions/48001001/error-with-installing-pygame-with-pip

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!