Seaborn Lineplot Module Object Has No Attribute 'Lineplot'

s-monie picture s-monie · Aug 14, 2018 · Viewed 32.8k times · Source

Using seaborn's documentation code to generate a lineplot returns an AttributeError: 'module' object has no attribute 'lineplot'. I have updated seaborn and reimported the module and tried again, no luck. Did lineplot get retired, or is there something else going on?

import seaborn as sns; sns.set()
import matplotlib.pyplot as plt
fmri = sns.load_dataset("fmri")
ax = sns.lineplot(x="timepoint", y="signal", data=fmri)

Answer

Anthony Lei picture Anthony Lei · Sep 17, 2018

If you are using conda, you need to install seaborn with the version specified:

conda install -c anaconda seaborn=0.9.0

Once your seaborn 0.9.0 is installed properly, you should be able to use the lineplot function (at least it works on mine).

That way you don't have to go outside of the conda ecosystem and use seaborn with pip.