Simple graphic library for beginners
Terry Reedy
tjreedy at udel.edu
Fri Jan 12 00:29:54 EST 2018
On 1/11/2018 2:51 PM, bartc wrote:
> I downloaded Python 3.7. It didn't work. I uninstalled and reinstalled
> it, this time with the 'set environment variables' option (to allow
> 'pip' to be typed from anywhere).
The recommended way to run pip and similar python code is
<python> -m pip install xyz
where <python> invokes a specific python binary on the particular
machine. For example, on Windows 10 with amd64 binaries installed.
C:\Users\Terry>py -3.6 -m pip install pygame
Collecting pygame
Downloading pygame-1.9.3-cp36-cp36m-win_amd64.whl (4.2MB)
100% |████████████████████████████████| 4.2MB 267kB/s
Installing collected packages: pygame
Successfully installed pygame-1.9.3
Notice the name of the .whl file!!!
> It still didn't work. I hid all the other Pythons. Same thing.
>
> The following is the transcript.
>
> c:\python37>pip install pygame
> Collecting pygame
> Using cached pygame-1.9.3.tar.gz
I believe that this is a compressed source archive that requires a C
compiler for any C files. Mainly intended for *nix, not Windows. Pip
should only try it after failing to find the proper .whl. Since pygame
wraps a C library, but expects Windows users to use a specific .whl, I
would not expect the .tar.gz to work on Windows even if you had the
required Microsoft C++ compiler.
The pygame people have not yet put a 3.7 windows .whl file on PyPI.
There *is* a 3.7 pygame .whl
pygame‑1.9.3‑cp37‑cp37m‑win_amd64.whl
with Windows binaries at the site previously recommended in this thread:
https://www.lfd.uci.edu/~gohlke/pythonlibs/
It can be downloaded manually and installed with a variant pip command,
as explained at the top of the page. (C. Gohlke does us a great service
by providing test binaries while a version is still in development.)
> What is this "Setup" file of which it speaks?
A file with info needed to compile C files and then install everything.
Terry Jan Reedy
More information about the Python-list
mailing list