rm-hull / luma.examples

Companion repo for running examples against the luma.oled, luma.lcd, luma.led_matrix and luma.emulator display drivers.
MIT License
367 stars 140 forks source link

pygame WARNING, No "Setup" File Exists, Running "buildconfig/config.py" #149

Closed sgjava closed 2 years ago

sgjava commented 2 years ago

Python 3.8.10 Ubuntu 20.04

Collecting pygame
  Using cached pygame-2.0.2.tar.gz (6.3 MB)
    ERROR: Commantup.py'"'"'; __file__='"'"'/tmp/pip-install-69hp7hcd/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-69hp7hcd/pygame/pip-egg-info
         cwd: /tmp/pip-install-69hp7hcd/pygame/
    Complete output (29 lines):

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

    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-69hp7hcd/pygame/setup.py", line 392, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config.py", line 241, in main
        deps = CFG.main(**kwds)
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config_unix.py", line 194, in main
        DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config_unix.py", line 39, in __init__
        self.ver = config[0].strip()
    IndexError: list index out of ranged errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-69hp7hcd/pygame/setup.py'"'"'; __file__='"'"'/tmp/pip-install-69hp7hcd/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-69hp7hcd/pygame/pip-egg-info
         cwd: /tmp/pip-install-69hp7hcd/pygame/
    Complete output (29 lines):

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

    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    /bin/sh: 1: sdl2-config: not found
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-69hp7hcd/pygame/setup.py", line 392, in <module>
        buildconfig.config.main(AUTO_CONFIG)
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config.py", line 241, in main
        deps = CFG.main(**kwds)
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config_unix.py", line 194, in main
        DependencyProg('SDL', 'SDL_CONFIG', 'sdl2-config', '2.0', ['sdl']),
      File "/tmp/pip-install-69hp7hcd/pygame/buildconfig/config_unix.py", line 39, in __init__
        self.ver = config[0].strip()
    IndexError: list index out of range
thijstriemstra commented 2 years ago

what version of python are you using? not sure why it's downloading the tarball and not a wheel file.

Probably same issue as https://stackoverflow.com/a/64357034/11355791

sgjava commented 2 years ago

Python 3.8.10, yeah I've been googling around. Let me see what version of pygame will load and I'll modify the examples setup.

thijstriemstra commented 2 years ago

pygame is used for the luma.emulator package and is optional when using the examples.

sgjava commented 2 years ago

OK, so I added export PATH="/home/username/.local/bin:$PATH" then pip3 install pygame

  Downloading pygame-1.9.6.tar.gz (3.2 MB)
     |████████████████████████████████| 3.2 MB 191 kB/s            
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pygame
  Building wheel for pygame (setup.py) ... done
  Created wheel for pygame: filename=pygame-1.9.6-cp38-cp38-linux_armv7l.whl size=3710045 sha256=e69732f521c91147666234cd2d61f81bd9bed5c819174c8552d61724e6516ab2
  Stored in directory: /home/username/.cache/pip/wheels/5c/3a/34/864e618a7e57b5df7cc5f1d1338aa43e7d566a4749a540c9b7
Successfully built pygame
Installing collected packages: pygame
Successfully installed pygame-1.9.6

It's breaking elsewhere now.

thijstriemstra commented 2 years ago

not sure why it doesn't install latest pygame (> 2.0).. but like I said, you should be able to ignore it unless you use the emulator.

sgjava commented 2 years ago

Yep, I'll close this out.