Fix AttributeError: module ‘librosa’ has no attribute ‘display’ Error – Librosa Tutorial

By | February 26, 2022

When we are using python librosa, we may get this error: AttributeError: module ‘librosa’ has no attribute ‘display’. In this tutorial, we will introduce you how to fix this error.

This error looks like:

Fix AttributeError: module 'librosa' has no attribute 'display' Error - Librosa Tutorial

This code is:

img = librosa.display.specshow(D, x_axis='time', y_axis='log', ax=ax)

How to fix this AttributeError?

In order to fix this error, you should import librosa.display in your script.

For example:

import librosa.display

Then you will find this error is fixed.

One thought on “Fix AttributeError: module ‘librosa’ has no attribute ‘display’ Error – Librosa Tutorial

Leave a Reply