define ProgressBar only if IPython can be imported