gpt4 book ai didi

python - 导入 Pandas : ImportError: cannot import name Counter in python 2. 6.6

转载 作者:太空宇宙 更新时间:2023-11-04 10:05:26 27 4
gpt4 key购买 nike

我正在使用 python 2.6.6

我安装的pandas如下

pip install pandas

我也收到了下面的成功信息

Building wheels for collected packages: pandas
Running setup.py bdist_wheel for pandas ... done
Stored in directory: /root/.cache/pip/wheels/81/18/d5/9f087d2b2763f0573195c75f297cac96125d02dbb5aef2297b
Successfully built pandas
Installing collected packages: six, python-dateutil, pytz, pandas
Successfully installed pandas-0.19.1 python-dateutil-2.6.0 pytz-2016.10 six-1.10.0

但是现在在导入它的时候

import pandas as pd

它给了我以下错误

>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/site-packages/pandas/__init__.py", line 22, in <module>
from pandas.compat.numpy import *
File "/usr/lib64/python2.6/site-packages/pandas/compat/__init__.py", line 333, in <module>
from collections import OrderedDict, Counter
ImportError: cannot import name Counter

这里缺少什么?

编辑:我安装了 backport_collections 0.1 并再次尝试。还是报错

最佳答案

尝试从此包安装 Pandas

https://pypi.python.org/pypi/pandas/0.16.2/

关于python - 导入 Pandas : ImportError: cannot import name Counter in python 2. 6.6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41245892/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com