Attributeerror: module ‘seaborn’ has no attribute ‘displot’ error occurs because ‘displot’ was not available in a version lower than v0.11. If your interpreter has a lower version then this is the main reason why you are getting this error. The best and only solution is to upgrade the ‘seaborn’ module. Do not worry it’s too easy to achieve. In this article, we will explore the best practices in upgrading seaborn.
Attributeerror: module ‘seaborn’ has no attribute ‘displot’ ( Solution ) –
As I have mentioned an upgrade of the underline package ( seaborn ) will fix this but the question is how?
Solution 1: Upgrading ‘seaborn’ using pip –
With pip, We can install or upgrade any package in just one line. But there are some variations with it let’s explore them all together.
pip install seaborn
The above command will install the latest version for seaborn. which is currently V 0.12, but the distplot is available from V0.11 hence if you are concerned about any compatibility with the latest version then you can try the below command to install any specific version.
pip install seaborn==0.11.2
Solution 2: Upgrading ‘seaborn’ using source code-
If you don’t want to use the package manager, Then you can try the source code to install seaborn. You can download it from seaborn official git respective branch and run the below command
python install setup.py
There will be a respective branch for each version in git.
End Notes :
If you want to understand more about attribute errors then read the below article –
Also If you want to understand more about seaborn and need a hands-on kind of article. Here is the same for you, Please give the walk-through –
Data Science Learner Team
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.