I am trying to use the Lilypond module from the Mingus package (for my final project) in CS50 IDE, but while running the following python code (as provided in the docs), it returns an error:

>>> import mingus.extra.LilyPond as LilyPond

>>> b = Bar()
>>> b + "C"
>>> b + "E"
>>> b + "G"
>>> b + "B"
>>> bar = LilyPond.from_Bar(b)
>>> LilyPond.to_png(bar, "my_first_bar") 

Error message:

Executing: lilypond -fpng -o "my_first_bar" "my_first_bar.ly"
/bin/sh: 1: lilypond: not found

As from the docs, I understand that this requires me to set lilypond's path in the PATH environment variable.

This does assume that you have LilyPond installed and in your $PATH.

Would appreciate any help here as I am unable to figure out how to set the env var in the editor as needed.

You must log in to answer this question.

Browse other questions tagged .