Cannot import seaborn module

Screen Link:

My Code:

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns

bike_sharing = pd.read_csv('day.csv')
bike_sharing['dteday'] = pd.to_datetime(bike_sharing['dteday'])

print(sns.heatmap(bike_sharing.corr(), annot=True))

What I expected to happen:
Heatmap displaying correlation coefficients

What actually happened:

Traceback (most recent call last):
    import seaborn as sns
ModuleNotFoundError: No module named 'seaborn'

Since these missions have been updated since I joined DQ, I wanted to complete these missions again in order to refresh/update my plotting skills which I feel have slipped a little over time. I remember using the seaborn module for generating heatmaps of correlation coefficients and found them super useful and easy to work with. However, I am getting this (basic) error that I can’t figure out. Is seaborn not an available package in this mission screen? Do I need to install seaborn via the console? Can I do that?

Hi Mike,

I’m doing the same thing now: re-passing those 2 updated courses :yum: They are really improved now!

Yes, it seems that the seaborn package isn’t available in that mission, as well as in the next one of that course. In the other missions it’s available, as weell as in the next course. You can or create a ticket, or, even better and much faster, just download the file and work on it on your local machine.

1 Like

Thanks for confirming, @Elena_Kosourova! That is some really good advice: work locally. Out of curiousity, what do you use for an IDE? I think I might just work on Google Colab so I don’t have to worry about setting up my local environment but I really should start getting some practice with that. :unamused:

Hi Mike,

I just use directly Jupyter notebook from Anaconda, no other IDE. And I find it super-convenient! If I have an issue to be debugged (the main reason why people can decide to use an IDE), I just google that issue and find the way of debugging. Also, I think that IDE are mostly helpful for syntactically relatively complicated languages like JavaScript, while Python is much more simple and comprehensible.

1 Like