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
If your python version is 2.+, you can type below code to the terminal :
pip install seaborn
if python version is 3+, type below:
pip3 install seaborn
I solved the same importing problem reinstalling to seaborn package with
conda install -c https://conda.anaconda.org/anaconda seaborn
by typing the command on a Windows command console Afterwards I could then import seaborn successfully when I launched the IPython Notebook via on Anaconda launcher.
On the other failed way launching the IPython Notebook via Anaconda folder did not work for me.
It seams that missing dependency of python-dev, install python-dev and then try to install seaborn, if you are using Ubuntu:
sudo apt-get install python-dev -y
pip install seaborn
Problem may not be associated with Seaborn but Utils package which may not be installed
sudo pip uninstall requests
and reinstalling, it no longer would work at all. Luckily, dnf install python-requests fixed the whole thing...
Also check for utils package is installed or not
You can install package using
sudo pip install utils
Check this link Python ImportError: cannot import name utils
I had the same problem and I am using iPython. pip or conda by itself did not work for me but when I use !conda it did work.
!conda install seaborn
I solved this problem by looking at sys.path (the path for finding modules) while in ipython and noticed that I was in a special environment (because I use conda).
so i went to my terminal and typed "source activate py27" is my python 2.7 environment. and then "conda update seaborn", restarted my jupyter kernel, and then all was good.