I was preparing to do some tasks in my physics course today, and experienced a rather annoying problem when attempting to use the python-visual package in Ubuntu.

There seems to be a bug in Ubuntu Karmic which results in the following output when trying to run this command:

from visual import *

The output is as follows:

Traceback (most recent call last):
  File "cooper.py", line 1, in
    from visual import *
  File "/usr/lib/python2.6/dist-packages/visual/__init__.py", line 59, in
    import cvisual
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only

The fix is luckily quite simple.

Andrew Mitchell has a package repository for Ubuntu which contains an update to a library called “boost”. You can add this repository by selecting System > Administration > Software Sources. Then select “Other Software” and click on “Add…”.

Now, type in the following in the textbox:


Then click “Add source” and “Close”. If prompted, select “Reload” and then go to System > Administration > Update Manager. Click “Check” and then install all updates.

When this has been done, you are ready to run your python script.

Happy coding!