How to install Python package from source on Windows

Chris Angelico rosuav at gmail.com
Thu May 18 15:46:27 EDT 2017


On Fri, May 19, 2017 at 4:17 AM, bartc <bc at freeuk.com> wrote:
> I'm sorry, I thought anyone who has used C a couple of times would know how
> to compile a Hello, World program. And would know how to download a file
> into a local directory. Here are some instructions to get started:
>
> (1) Click on this link:
>
>   https://github.com/bartg/langs/blob/master/bccproj/hello.c
>
> (2) Click the Raw option on the bar across the top of the text
>
> (3) Select all and copy to clipboard (eg. ctrl-A followed by Ctrl-C on my
> browser)
>
> (4) Open your programming editor and paste into a new file; save it as
> hello.c
>
> (5) In the same directory where you put hello.c, now invoke your C compiler.

(1) How do we know that that's the link to follow? (Or the equivalent
for your other source files.)

(2) (3) (4) Downloading a file depends on the clipboard now? Gee,
thanks. And here I thought the normal way to download something with a
web browser was to click on a link (or, at worst, right-click the link
and hit "Save link as"), and it would get downloaded into the place
that I have previously configured my web browser downloads to land.
How silly of me.

(5) I think everyone in this thread knows how to invoke a program in a
directory. Believe you me, PLENTY of people do not. First, on many
systems, you have to open a terminal. Then you 'cd' into some
directory - which one? And finally you copy and paste the command and
let it run.

It's a lot easier to deploy through git. You say something like this:

$ git clone https://github.com/python/cpython
$ cd cpython
$ ./configure
$ make

Or sometimes it's even simpler, because the authors made a base
makefile that automatically runs configure for you.

$ git clone git://pike-git.lysator.liu.se/pike.git
$ cd pike
$ make

(It still does basically the same thing; there's a pike/src directory
that has the configure script, and a top-level make will invoke that.
Just one less step for the end user.)

Apart from having to explain the convention of "stuff starting with a
dollar sign is commands to type, but don't type the dollar sign
itself", this is pretty straight-forward. Yes, you still have to
explain how to open up a terminal, but you don't have to mess around
with "which directory did you save that into", because you'll
generally get put into some sort of home directory, and you can do
everything from there.

And hey, whaddayaknow... those instructions work on Linux, Mac OS, and
pretty much every POSIX-compliant system there is. And plenty that
aren't very POSIX-compliant too. You might need special instructions
for Windows, but everything else will work, even if it's not gcc. How
are people supposed to invoke a C compiler if they don't even know
which one(s) is/are installed?

ChrisA



More information about the Python-list mailing list