can't import pandas?

303 views
Skip to first unread message

Jin-Keat Lim

unread,
Feb 3, 2014, 9:36:37 PM2/3/14
to pystat...@googlegroups.com
Hi - what am I doing wrong? I am a beginner and following an online tutorial and ran into some issues, would appreciate some hand holding.

- already installed numpy, working fine. Scipy,
- Python 2.7.5+

On Ubuntu terminal I entered: "sudo pip install pandas"
In Python tried to import pandas, received below:

cannot import name SNDArray
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pandas/__init__.py", line 6, in <module> from . import hashtable, tslib, lib
File "reduce.pyx", line 5, in init pandas.lib (pandas/lib.c:53071)
ImportError: cannot import name SNDArray

I also tried "sudo apt-get install pandas"
I also tried upgrading pandas, it says requirement already up-to-date

Thanks for helping out a beginner.

Jeff Reback

unread,
Feb 3, 2014, 9:45:41 PM2/3/14
to pystat...@googlegroups.com
try deleting the previous pandas install completely then reinstall

look prob in somewhere like

/usr/local/lib/python2.7/site-packages

Jin-Keat Lim

unread,
Feb 3, 2014, 10:01:02 PM2/3/14
to pystat...@googlegroups.com
ok .. it was in dist-packages, and I see pandas after typing "ls". But after typing "sudo apt-get remove pandas" I get a message that says the package 'pandas' is not installed, so not removed

Jeff Reback

unread,
Feb 3, 2014, 10:11:26 PM2/3/14
to pystat...@googlegroups.com
no that's the system package 

delete the pandas directory in dist-packages

Jin-Keat Lim

unread,
Feb 4, 2014, 12:16:31 AM2/4/14
to pystat...@googlegroups.com
ok I uninstalled, and rm the directory, then reinstalled via pip. Now I get a different error:

Python 2.7.5+ (default, Sep 19 2013, 13:49:51)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pandas/__init__.py", line 37, in <module>
    import pandas.core.config_init
  File "pandas/core/config_init.py", line 17, in <module>
    from pandas.core.format import detect_console_encoding
  File "pandas/core/format.py", line 9, in <module>
    from pandas.core.index import Index, MultiIndex, _ensure_index
  File "pandas/core/index.py", line 11, in <module>
    import pandas.index as _index
  File "index.pyx", line 35, in init pandas.index (pandas/index.c:14976)
AttributeError: 'module' object has no attribute 'utc'

Jeff Reback

unread,
Feb 4, 2014, 5:12:20 AM2/4/14
to pystat...@googlegroups.com


pls show what your pip command is
show pandas/ci/print_versions.py
Reply all
Reply to author
Forward
0 new messages