Simple graphic library for beginners

bartc bc at freeuk.com
Thu Jan 11 13:33:55 EST 2018


On 11/01/2018 15:23, Chris Angelico wrote:
> On Fri, Jan 12, 2018 at 12:38 AM, bartc <bc at freeuk.com> wrote:

>> Although I can't run it because 'pygame' is not available. I think
>> installing this library is likely to be a bigger obstacle than programming
>> any graphics!
>>
>> (If I try and download it as a ready-built library for Windows, it has a
>> range of .msi files, none of which is a match for my Python. The newest is
>> for win32 Py3.2; I need win64 Py3.6. While building from source involves
>> running MSVC 2008 .... urghh)
> 
> https://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame
> 
> Go. Fetch. Stop fudding.

And you know this link, how? Because googling for 'download pygame', it 
doesn't appear on the first page (or in any of the next half dozen).

But clicking on it, the most promising link seems to have 'cp36' and 
'amd64'; I assume the 36 means 3.6.

OK, but what the hell do I do with a .whl file? Google tells me I 
install it something like this: pip install file.whl.

Except my Python 3.6 doesn't have pip. There is a however a copy in my 
Python 3.4. But that gives me the message:

  "pygame-1.9.3-cp36-cp36m-win_amd64.whl is not a supported wheel on 
this platform."

Maybe I need the 3.4? Download that (which is a bit of pig getting it 
from my browser's download directory, to anywhere else on my file 
system). But same error.

Maybe it's the AMD64 bit, as my processor is Intel. (But is is really 
that critical??) I try the win32 version - same error.

Perhaps I'm overthinking it, maybe this will work:

   pip install pygame

and it will do whatever it needs to do to locate and download whatever 
version it knows is needed.

Well, that seemed to do something, and it didn't need me to download any 
.whl files. But then I noticed a bunch of errors culminating with:

"Command python setup.py egg_info failed with error code 1 in 
C:\Users\user\AppData\Local\Temp\pip_build_user\pygame"

So, yeah, it IS a palaver. Although even that wouldn't be a problem if 
it worked.

And, yeah, I will continue to say that installing libraries in Python is 
such a PITA that I usually don't bother.

Things should Just Work. Or be simple enough that you can easily find 
out why they don't.

-- 
bartc



More information about the Python-list mailing list