Error importing seaborn in ipython notebook - work

2019-09-02 09:02发布

问题:

I have a somewhat similear problem as this guy: when I want to import seaborn in my ipython notebook I get an import error. When I try to import seaborn in ipython console it works! What is the problem?

ImportError                               Traceback (most recent call last)
<ipython-input-6-085c0287ecb5> in <module>()
----> 1 import seaborn

/usr/lib/python3.4/site-packages/seaborn/__init__.py in <module>()
----> 1 from .rcmod import *
      2 from .utils import *
      3 from .palettes import *
      4 from .linearmodels import *
      5 from .distributions import *

/usr/lib/python3.4/site-packages/seaborn/rcmod.py in <module>()
      3 import matplotlib as mpl
      4 
----> 5 from . import palettes
      6 
      7 

/usr/lib/python3.4/site-packages/seaborn/palettes.py in <module>()
     11 from .external.six.moves import range
     12 
---> 13 from .utils import desaturate, set_hls_values
     14 from .xkcd_rgb import xkcd_rgb
     15 from .miscplot import palplot

/usr/lib/python3.4/site-packages/seaborn/utils.py in <module>()
      5 
      6 import numpy as np
----> 7 from scipy import stats
      8 import pandas as pd
      9 import matplotlib.colors as mplcol

/usr/lib/python3.4/site-packages/scipy/stats/__init__.py in <module>()
    336 from __future__ import division, print_function, absolute_import
    337 
--> 338 from .stats import *
    339 from .distributions import *
    340 from .rv import *

/usr/lib/python3.4/site-packages/scipy/stats/stats.py in <module>()
    186 import numpy as np
    187 
--> 188 from . import futil
    189 from . import distributions
    190 

ImportError: cannot import name 'futil'