4

I cannot install pygame on cygwin properly. I tried to follow that old doc , http://msdl.cs.mcgill.ca/people/tfeng/svmsccdoc/node49.html, but it doesn't work.

Worse issue is SDL not be able to install correctly

Any helps are welcomed as I've been struggling for days.

Andy K
  • 392
  • 2
  • 5
  • 23
  • What OS are you on? I'd try to avoid building Pygame if possible. –  Feb 09 '15 at 17:09
  • Hi Malik, windows but with Cywin. – Andy K Feb 09 '15 at 17:10
  • Can't you just install with the installer? –  Feb 09 '15 at 17:11
  • not with cygwin alas. If I was using windows, it would be fine but I'm explicitly looking to having it installed on cygwin. – Andy K Feb 09 '15 at 17:12
  • Did you read this: http://msdl.cs.mcgill.ca/people/tfeng/svmsccdoc/node49.html It specifically mentions cygwin – Photon Feb 09 '15 at 17:13
  • SDL has a cygwin pre-built package. tried that? – Photon Feb 09 '15 at 17:15
  • I don't understand the deal with Cygwin. Is it some sort of Linux terminal on Windows? –  Feb 09 '15 at 17:17
  • it is Malik. I wanted to teach some students how to use Linux on Windows without having to install a version of Linux on dual boot or to have a VM. – Andy K Feb 09 '15 at 17:18
  • Tried it , Photon. `apt-cyg install SDL` --> Installing SDL Package SDL not found or ambiguous name, exitin – Andy K Feb 09 '15 at 17:19
  • Then use `sudo apt-get install python-pygame`. –  Feb 09 '15 at 17:23
  • Nope. I tried apt-cyg install pygame and it does not work – Andy K Feb 09 '15 at 17:25
  • That's not the package name. use the cygwin search, or try: libSDL-devel – Photon Feb 09 '15 at 17:25
  • https://cygwin.com/cgi-bin2/package-grep.cgi?grep=SDL&arch=x86 – Photon Feb 09 '15 at 17:26
  • For SDL Unpacking... Package libSDL1.2_0 requires the following packages, installing: libgcc1 libGL1 libX11_6 libXext6 libXrandr2 libXrender1 Package libgcc1 is already installed, skipping Package libGL1 is already installed, skipping Package libX11_6 is already installed, skipping Package libXext6 is already installed, skipping Package libXrandr2 is already installed, skipping Package libXrender1 is already installed, skipping Package libSDL1.2_0 installed – Andy K Feb 09 '15 at 17:29
  • For pygame after that python setup.py In file included from src/imageext.c:47:0: src/pygame.h:106:17: erreur fatale: SDL.h : No such file or directory #include ^ compilation terminée. error: command 'gcc' failed with exit status 1 – Andy K Feb 09 '15 at 17:30
  • Why don't you use the cygwin installer, which also will install dependencies? The cmd line probably needs a switch for that – Photon Feb 09 '15 at 17:30
  • You mean run the windows binaries then re run the Linux part? – Andy K Feb 09 '15 at 18:04
  • No, I mean the cygwin setup.exe that's linked on their (cygwin.com) main page. It has a wizard that lets you search for packages easily – Photon Feb 09 '15 at 18:05
  • Not inside, photon – Andy K Feb 09 '15 at 18:15
  • Have you seen this question: http://stackoverflow.com/questions/8091942/pygame-running-in-cygwin-no-available-video-device Look at the accepted answer –  Feb 14 '15 at 16:24
  • Hi @PythonMaster, thanks but no, the answer is not correct. – Andy K Feb 19 '15 at 11:25

2 Answers2

3

One way to deal with that is to install the python binaries for windows.

Once the python binaries installed, install the pygame binaries for Windows as well and then run the python binaries from your cygwin console.

Then open a python console and type

import pygame
Andy K
  • 392
  • 2
  • 5
  • 23
1

Just to rule out one of the simplest things: Have you installed the cygwin Packages "libSDL-devel" and "libSDL1.2_0"?

Are you running 32bit cygwin or 64bit cygwin?

ZacekV
  • 11
  • 1