bar_label is relatively new. If you don’t have the method on your axes, you are using an old version.
bar_label