lilypond-book. The problem seems to be due to a python versioning problem. A special import statement makes an easy fix. Details follow.lilypond-book is a python script with the shell directive #!/usr/bin/python as the first line. No problem unless /usr/bin/python points to a version of python older than 2.4. This is, on my system, in fact the case.
$ /usr/bin/python -V
Python 2.3.5
Why is this is a problem? Because the
python set( ) constructor didn't become a language built-in until version 2.4 or so. Prior to that, you had to invoke set( ) with something like sets.Set( ) after importing the sets module somewhere.On my box I have
python 2.5 installed and set as to run as the default python in my path.
$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/pythonSo I have two options.
$ `which python` --version
Python 2.5
- Fix
lilypond-bookto look at thepython2.5 install on my user path- Stick an import statement somewhere at the top of
lilypond-booksopython2.3.5 can referencesets.Set( )globally asset( )
I don't know enoughlilypond-bookfor option #1 so I went the option #2 route instead and stuckfrom sets import Set as setat line 37. And nowlilypond-book2.11.43 is happy.
There's abug-lilypondthread open onlilypond-book2.11.43 troubles. Graham started the thread, Han-Wen replied, and maybe these notes will help find the fix.

No comments:
Post a Comment