.. title: Create Sequence Diagrams Using seqdiag .. slug: create-sequence-diagrams-using-seqdiag .. date: 2014-10-01 18:06:44 .. tags: python, seqdiag .. category: .. link: .. description: .. type: text Have you ever needed to create `sequence diagrams `_? If you're like me you constantly have to. Up to now I have always used a manual process using pen/paper or Visio. But I wanted an easier way and found `seqdiag `_. .. TEASER_END: Read more I installed it in a virtualenv on Ubuntu 14.04. :: codeghar@host~$ virtualenv --system-site-packages virt I used `--system-site-packages` because seqdiag relies on Python Imaging Library (PIL). Of course, make sure you have python-pil package installed in your OS. I ran into this problem (`About the PIL Error — IOError: decoder zip not available `_) when I didn't use `--system- site-packages`. The impression I got was it's `hard to get PIL installed in a virtualenv `_ and easier to just use the system-wide PIL. :: codeghar@host~$ source virt/bin/activate (virt)codeghar@host~$ pip install seqdiag To create a diagram you need to provide a dialog in a .diag file. You can look at the `sample diagrams `_ for more information. The following will create a new file (or overwrite an existing file) called example.png. :: (virt)codeghar@host~$ seqdiag -Tpng --no-transparency example.diag Hat tip to `generate uml sequence diagrams with python or perl `_ for bringing seqdiag to my attention. Note: I published this post originally at `Create Sequence Diagrams Using seqdiag `_. Migrated to Nikola in February 2015.