当我尝试导入大熊猫时,出现以下错误:
ImportError:无法导入名称“ maybe_downcast_numeric”
完整的追溯信息如下:
ImportError Traceback (most recent call last)
<ipython-input-1-2f8ac4e49576> in <module>()
----> 1 import pandas as pd
2 # import time
3 # import seaborn as sns
4 # import matplotlib.pyplot as plt
5 # import datetime
D:\Anaconda3\envs\tensorflow\lib\site-packages\pandas\__init__.py in <module>()
40 import pandas.core.config_init
41
---> 42 from pandas.core.api import *
43 from pandas.core.sparse.api import *
44 from pandas.stats.api import *
D:\Anaconda3\envs\tensorflow\lib\site-packages\pandas\core\api.py in <module>()
8 from pandas.core.dtypes.missing import isnull, notnull
9 from pandas.core.categorical import Categorical
---> 10 from pandas.core.groupby import Grouper
11 from pandas.io.formats.format import set_eng_float_format
12 from pandas.core.index import (Index, CategoricalIndex, Int64Index,
D:\Anaconda3\envs\tensorflow\lib\site-packages\pandas\core\groupby\__init__.py in <module>()
----> 1 from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
2 from pandas.core.groupby.groupby import GroupBy
3 from pandas.core.groupby.grouper import Grouper
4
5 __all__ = [
D:\Anaconda3\envs\tensorflow\lib\site-packages\pandas\core\groupby\generic.py in <module>()
34 from pandas.util._decorators import Appender, Substitution
35
---> 36 from pandas.core.dtypes.cast import (
37 maybe_convert_objects,
38 maybe_downcast_numeric,
ImportError: cannot import name 'maybe_downcast_numeric'
我没有找到关于此错误的任何参考。我确实是通过Anaconda提示符安装的。我相信,当我开始追溯我的每一步时,我在用
安装seaborn
后开始出现此问题
conda install seaborn
并且在安装过程中,当它要求安装其他软件包时,没有读取它就砸碎了Y
按钮。我看到了,它也包括熊猫包装。也许是这样吗?最初很久以前,我想我已经在
上安装了pandas
pip install pandas
我如何能更轻松地解决此错误,而不是从头开始重新安装所有内容?