How can I install pygame on python with cygwin?

Solution 1:

I can confirm that you won't be able to compile pygame from source on Cygwin with Cygwin's gcc-core. Apparently src/camera.h includes <linux/videodev.h> (if __unix__ is defined, which is true for Cygwin), which is not available on Windows, even with Cygwin (you need the Video4Linux framework for that).

I didn't bother to install the Windows binaries, but in principle those should work. Try to explicitly run the system Python from Cygwin rather than the Cygwin Python.

Also, I agree with @barlop: why start with games? There are better things about programming. Even if you insist on writing games, find some better-maintained package that your students can install all by themselves (how can you teach your students when you can't even figure it out yourself?); pygame is a crappy package (IMO) that can't even play the standard PyPI game.