Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python 2.7 module pandas not installing "cannot import name hashtable"

I tried looking for an answer to this around the forum/google, but I can't find anything. My issue is this (from python console):

>>> import pandas
cannot import name hashtable
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python27\lib\site-packages\pandas\__init__.py", line 6, in <module>
    from . import hashtable, tslib, lib
ImportError: cannot import name hashtable //also can't import name NaT somtimes

I ran the windows 1-click installer prior to attempting the import. I'm running everything 32-bit. The pandas installer is for python 2.7.

Here's a list of modules that I have correctly imported into Python.

  1. setuptools
  2. pip
  3. mox
  4. dateutil
  5. six
  6. numpy
  7. SQLAlchemy

I'm on windows 7.

I also have anaconda installed, but that was really just a "hail mary" after I tried everything else. My end goal is to install the ultra-finance module. However, it seems to require pandas, hence me being stuck.

I'm a python noob, so please don't assume I know anything. Thanks.

EDIT: please let me know if I can provide any extra information.

like image 284
downtempo Avatar asked Jun 15 '13 23:06

downtempo


2 Answers

The recommended way to install pandas is via pip:

pip install pandas

This hashtables error arises from the cython files not being built. This error message will be more informative from 0.11.1.

like image 173
Andy Hayden Avatar answered Oct 22 '22 16:10

Andy Hayden


Try running your code in Spyder (Anaconda -> Spyder). It worked for me.

like image 1
Eldorado Avatar answered Oct 22 '22 15:10

Eldorado