导入seaborn时遇到问题

时间:2018-07-26 04:11:15

标签: python python-3.x scipy

由于某种原因,我无法进口seaborn。我正在尝试在Jupyter中使用它。我已经安装了Python 3.6.5。我用pip安装seaborn。我对此也有类似的疑问,但是我是python的新手,很难

输入:

#import necessaries libraries
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns

我收到此错误:

   ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-eaef722397b2> in <module>()
      3 import numpy as np
      4 import matplotlib.pyplot as plt
----> 5 import seaborn as sns

~/anaconda3/lib/python3.6/site-packages/seaborn/__init__.py in <module>()
      4 
      5 # Import seaborn objects
----> 6 from .rcmod import *
      7 from .utils import *
      8 from .palettes import *

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

~/anaconda3/lib/python3.6/site-packages/seaborn/palettes.py in <module>()
     10 from .external.six.moves import range
     11 
---> 12 from .utils import desaturate, set_hls_values, get_color_cycle
     13 from .colors import xkcd_rgb, crayons
     14 

~/anaconda3/lib/python3.6/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 as mpl

~/anaconda3/lib/python3.6/site-packages/scipy/stats/__init__.py in <module>()
    346 from __future__ import division, print_function, absolute_import
    347 
--> 348 from .stats import *
    349 from .distributions import *
    350 from .morestats import *

~/anaconda3/lib/python3.6/site-packages/scipy/stats/stats.py in <module>()
    173 from scipy._lib.six import callable, string_types
    174 from scipy._lib._version import NumpyVersion
--> 175 import scipy.special as special
    176 import scipy.linalg as linalg
    177 from . import distributions

~/anaconda3/lib/python3.6/site-packages/scipy/special/__init__.py in <module>()
    638 from .sf_error import SpecialFunctionWarning, SpecialFunctionError
    639 
--> 640 from ._ufuncs import *
    641 
    642 from .basic import *

ModuleNotFoundError: No module named 'scipy.special._ufuncs'

关于我需要做什么的任何想法?我尝试重新安装,但没有成功。

0 个答案:

没有答案