2

I normally prefer to read on my own rather than post, but I am totally flummoxed here. I am getting the same error as this question: Importing pandas shows ImportError: cannot import name hashtable so I tried everything posted there to no avail. I am now running Anaconda and finally managed to install pandas, apparently with no problems, but I am still getting the same error. As a reminder, it is:

ImportError: cannot import name hashtable

Honestly, it is difficult to remember everything I have done to attempt to solve this problem. Most recently, I have tried uninstalling/reinstalling pandas, uninstalling/reinstalling numpy, then pandas, installing an earlier version of pandas, installing cython, and checking the PATH (It is C:\Users\myname\AppData\Local\Continuum\Anaconda; C:\Users\myname\AppData\Local\Continuum\Anaconda\Scripts, which matches what the Anaconda command prompt says when I start it).

I am running Windows 7 64-bit and Python 2.7 through Anaconda (Spyder). Thank you in advance for any advice you can provide.

Community
  • 1
  • 1
Tropictuco
  • 45
  • 5
  • Does this also occur if you create a fresh environment? `conda create -n newenv pandas` and then `activate newenv` – joris Jan 21 '15 at 10:40
  • @joris I went ahead and tried that and it still didn't work. Then Spyder stopped working and I couldn't start either it or the Launcher so I uninstalled and reinstalled Anaconda. Now pandas works! Thanks for the suggestion. – Tropictuco Jan 22 '15 at 01:48

2 Answers2

3

Try conda install -f pandas. See http://conda.pydata.org/docs/troubleshooting.html#resolution-occasionally-an-installed-package-will-become-corrupted.

asmeurer
  • 86,894
  • 26
  • 169
  • 240
0

Think Panda maybe case sensitive with folder location. This makes it fail when you try to import it into ipython and jupyter notebooks. For some reason when I started jupyter notebook and specified the path $HOME/path. It would crash when I did import panda but work on command prompt initially in a different location. When I tried running python command prompt $HOME/path it would crash as well so decide to move my notebooks to another location and it worked fine. Not sure who else may face a similar situation hopefully its useful. Would also get an error

  • ImportError: C extension: hashtable not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace' to build the C extensions first.
  • urllopen error as well.

Because of the different error notifications took some time to break it down to folder issue.

kenoti
  • 1