我在seaborn导入中遇到这个问题:

nir*_*ale 5 python pandas seaborn jupyter-notebook

当我尝试在 Jupiter 笔记本中运行以下行时

> import seaborn as sns     
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-2-ed9806ce3570> in <module>()
----> 1 import seaborn as sns

~/anaconda3/lib/python3.6/site-packages/seaborn/__init__.py in <module>()
      8 from .palettes import *
      9 from .regression import *
---> 10 from .categorical import *
     11 from .distributions import *
     12 from .timeseries import *

~/anaconda3/lib/python3.6/site-packages/seaborn/categorical.py in <module>()
      5 from scipy import stats
      6 import pandas as pd
----> 7 from pandas.core.series import remove_na
      8 import matplotlib as mpl
      9 from matplotlib.collections import PatchCollection

ImportError: cannot import name 'remove_na'
Run Code Online (Sandbox Code Playgroud)

下面列出了依赖版本:

Python 3.6.3

康达4.8.2

numpy 1.18.0

熊猫1.0.1

scipy 1.1.0

matplotlib 3.1.3

这里有什么问题呢?

nir*_*ale 4

好的,

所以我仍然不知道这出了什么问题,但我确实解决了问题。

我只是卸载了seaborn

pip3 uninstall seaborn
Run Code Online (Sandbox Code Playgroud)

并再次安装

pip3 install seaborn
Run Code Online (Sandbox Code Playgroud)

成功了,这次没有错误。

但我还是不知道,第一次出了什么问题。

如果有人可以提供帮助,请分享。