Fixing a bug with python-visual in Ubuntu Karmic

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:

ppa:ajmitch/ppa

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!

This entry was posted in Programming, Python, Ubuntu. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">