pyparsing Catch-22

7stud bbxx789_05ss at yahoo.com
Sun Apr 15 22:53:51 EDT 2007


On Apr 15, 7:41 pm, Steven Bethard <steven.beth... at gmail.com> wrote:
> 7stud wrote:
> > For as hard as you push pyparsing on this forum, I would think you
> > would make it easier to download and install your module.   In my
> > opinion, the wiki should provide detailed installation instructions
> > for all supported os's, and the sourceforge downloading process is too
> > complicated.
>
> FWIW, here's what works for me::
>
> * Go tohttp://pyparsing.wikispaces.com/
> * Click the link at the top that says "Download from SourceForge"
> * Click the big green "Download Python parsing module" button
> * Click the big green "Download" button next to "pyparsing-1.4.6"
> * Click pyparsing-1.4.6.tar.gz
> * Extract the dowloaded .tar.gz
> * Use the standard python installation idiom "python setup.py install"
>
> If you're not familiar with the standard Python installation idiom, take
> a few minutes to read:
>
>      "Installing Python Modules"http://docs.python.org/inst/inst.html
>
> In particular it starts with "The new standard: Distutils", which tells
> you to try::
>
>      python setup.py install
>
> HTH,
>
> STeVe

Thanks!

I thought I would write down what I did in case someone else looks
this up:

1) Even though the download at sourceforge said the file name was:

pyparsing-1.4.6.tar.gz

it was downloaded to my Desktop as:

pyparsing-1.4.6.tar

Did os x 10.4.7 automatically unzip it for me?  .gz means the file was
compressed with gzip, but I didn't have to do any unzipping.

2) Apparently, a .tar file is not a compressed file--it just organizes
a bunch of files into one big file or "archive".  You still need to do
something to extract all the files from the archive.  Here is the
command:

$ tar -xvf /Users/me/Desktop/pyparsing-1.4.6.tar

That command extracts the contents into the current directory(i.e. the
directory the prompt is pointing to), which can overwrite files with
the same names.  So I created a directory called tar_temp:

/Users/me/tar_temp

and used the cd command to change the prompt to that directory.
(Note: the ~ prompt is shorthand for /Users/YourHomeDirName)

3) To run: python setup.py install, you need to get to the top level
directory of the download.  So, I cd'ed to the directory:

~/tar_temp/pyparsing-1.4.6

and then ran the setup command:

~/tar_temp/pyparsing-1.4.6$ python setup.py install

I tested the setup by running the hello world program described in the
document:

~/tar_temp/pyparsing-1.4.6/HowToUsePyparsing.html

and it worked.




More information about the Python-list mailing list