I am trying to import seaborn into python (using 2.7) using the following code:
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
imp
I had faced the same problem. Restarting the notebook solved my problem.
If that doesn't solve the problem, you can try this
pip install seaborn
Edit
As few people have posted in the comments, you can also use
python -m pip install seaborn
Plus, as per https://bugs.python.org/issue22295 it is a better way because in this case, you can specify which version of python (python3 or python2) to use for running pip
pip install seaborn
is also solved my problem in windows 10
it's a problem with the scipy package, just pip uninstall scipy
and reinstall it
I would definitely recommend that you install Anaconda and then use the "pip install seaborn" command from the Lab Jupyter IDE. It should work. It seems that the package is already pre-installed on Lab Jupyter.
As @avp says the bash line pip install seaborn
should work
I just had the same problem and and restarting the notebook didn't seem to work but running the command as jupyter line magic was a neat way to fix the problem without restarting the notebook
Jupyter Code-Cell:
%%bash
pip install seaborn
I have the same problem and I solved it and the explanation is as follow:
If the Seaborn package is not installed in anaconda, you will not be able to update it, namely, if in the Terminal we type: conda update seaborn
it will fail showing: "PackageNotFoundError: Package not found: 'seaborn' Package 'seaborn' is not installed in /Users/yifan/anaconda"
Thus we need to install seaborn in anaconda first by typing in Terminal: conda install -c https://conda.anaconda.org/anaconda seaborn
Then the seaborn will be fetched and installed in the environment of anaconda, namely in my case, /Users/yifan/anaconda
Once this installation is done, we will be able to import seaborn in python.
Side note, to check and list all discoverable environments where python is installed in anaconda, type in Terminal: conda info --envs