[Tutor] Fw: Installing Pyserial for Python27 on Win 7

Walter Prins wprins at gmail.com
Tue Nov 23 14:57:23 CET 2010


On 23 November 2010 03:02, John Smith <jocjo.s at verizon.net> wrote:

> I _assume_ the source is the one that is a tar.gz thingy. Since Windows
> will not handle the unpacking of that, I have to install a
> decompressor/unpacker to do it. Then I can finally get around to installing
> the serial package. Maybe. Unless I run into a similar problem because of
> Win 7 or because pyserial is 32-bit.
>
> I think it is better that I stop now before I install a bunch of extra
> applications that I need only to install one or two Python modules.
>
> I like Python itself. Very powerful. But I guess I'll look for some other
> language which provides the features I need without the hassle. Thanks again
> for your help.
>

Without wanting to be rude: Maybe you shouldn't *assume* anything about
something you apparently know little about and jump to conclusions so
quickly, and rather ask some pertinent questions.  You know what they say
about "assume", it makes an "ass" out of "u" an "me".

Firstly, .tar.gz is more or less the standard archive format for Unix and
Linux based systems (actually it's an archive that's then subsequently
compressed but I digress.)  It's hardly esoteric these days, and there's
numerous archivers that will deal with this format for you on Windows.  It's
a 1 minute problem, literally, to deal with. My favourite on Windows is
IZArc, here: http://www.izarc.org/  Frankly I don't understand why dealing
with this is seen as a lot of hassle or why you're afraid of this cluttering
up your system due to a simple (to you unknown new) file format problem, and
why you assume that implies you'll have 32/64 bit problems as well.

In any case for the record, Python source, especially cross-platform source,
will often be distributed as .tar.gz and oftentimes its actually preferred
to use the source if possible, there's no need to be worried about this or
to fear it in any way.

Furthermore, let me point out that you could even have dealt with this file
with for Python itself , e.g:

> import gzip
> import StringIO
> import tarfile
>
> tardata = gzip.open('c:/pyserial-2.5.tar.gz', 'rb').read()
> tardataIO = StringIO.StringIO(tardata)
> tf = tarfile.TarFile(fileobj=tardataIO)
> tf.extractall('c:/temp')
>

That will uncompress and then extract the file using standard Python.  All
you then have to do is go and run "python setup.py install"  from a command
prompt in the extracted folder, to install it into your Python installation
(which again is an action you'll get quite used to if you're used to using
Python for a while and want to install from source, when you're not using
even easier methods like "easy_setup" or "pip"...)


Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20101123/b1786109/attachment-0001.html>


More information about the Tutor mailing list