Skip to content

import pandas fails with cannot import name Timestamp / hashtable #3362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vincenzooo opened this issue Apr 15, 2013 · 10 comments
Closed

import pandas fails with cannot import name Timestamp / hashtable #3362

vincenzooo opened this issue Apr 15, 2013 · 10 comments
Labels
Build Library building on various platforms
Milestone

Comments

@vincenzooo
Copy link

I installed version pandas-0.11.0.dev-cddde22.win32-py2.7.exe but I always got the errors while importing pandas.Then I tried to install pandas-0.10.1.win32-py2.7.exe (without uninstalling the previous, I didn't know how to do, it didn't change anything. I have vista.
The error is 'cannot import name hashtable' if I use from pandas import *, or 'cannot import name Timestamp' if I use import pandas.

E:\work\work_pzt\measure_data\RNR283>python
Enthought Python Distribution -- www.enthought.com
Version: 7.0-2 (32-bit)

Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 2 2010, 10:35:02) [MSC v.150
0 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pandas
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\pandas__init__.py", line 25, in
import pandas.core.config_init
File "C:\Python27\lib\site-packages\pandas\core\config_init.py", line 3, in
from pandas.core.format import detect_console_encoding
File "C:\Python27\lib\site-packages\pandas\core\format.py", line 12, in
from pandas.core.index import MultiIndex, _ensure_index
File "C:\Python27\lib\site-packages\pandas\core\index.py", line 13, in <module

from pandas.lib import Timestamp

ImportError: cannot import name Timestamp

from pandas import *
cannot import name hashtable
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\pandas__init__.py", line 6, in
from . import hashtable, tslib, lib
ImportError: cannot import name hashtable

@ghost
Copy link

ghost commented Apr 17, 2013

Hi @vincenzooo ,

Most of the devs don't use windows so it can be difficult to chase down issues like this.
However, the windows binaries get used by quite a few users and so far this is the only report
we've gotten.
With 0.11.0 due in a few days, it's important that we know if this is a regression introduced in
0.11.0 for all users, or something particular to your system.
With that in mind, Is there any version of the binaries that you've been able to get working on your system?

@vincenzooo
Copy link
Author

I tried with easy_install, pip, setup.py install, all of them failed.
I tried the windows installer with ver 9.1. It installs, but it doesn't work (with a different message from 10.1).

Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 2 2010, 10:35:02) [MSC v.15
0 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pandas
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named pandas

C:\Users\kov_2\Downloads>python
Enthought Python Distribution -- www.enthought.com
Version: 7.0-2 (32-bit)

Python 2.7.1 |EPD 7.0-2 (32-bit)| (r271:86832, Dec 2 2010, 10:35:02) [MSC v.15
0 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import pandas
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\pandas__init__.py", line 25, in
from pandas.core.api import *
File "C:\Python27\lib\site-packages\pandas\core\api.py", line 6, in
from pandas.core.algorithms import factorize, match, unique, value_counts
File "C:\Python27\lib\site-packages\pandas\core\algorithms.py", line 8, in
import pandas.core.common as com
File "C:\Python27\lib\site-packages\pandas\core\common.py", line 182, in
na_override=lib.iNaT),
AttributeError: 'module' object has no attribute 'iNaT'
from pandas import *
'module' object has no attribute 'lib'
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\pandas__init__.py", line 10, in
import pandas.lib as lib
AttributeError: 'module' object has no attribute 'lib'

@ghost
Copy link

ghost commented Apr 18, 2013

@vincenzooo , did you resolve the problem? if so, would appreciate it if you explain what
the cause was, as it might save another user some time in the future.

@vincenzooo
Copy link
Author

Unfortunately, I was not able to solve it and I have no ideas about what I can try more.
Since it seems I am the only one affected, it is probably a problem of my distribution or the setup on my computer or some dependance, so I am giving up.

@discostews
Copy link

I've had the same problem. Trying to use Pandas with Python 3.3 first. Then uninstalled everything and started with a fresh install of Python 2.7. No luck - same error:

cannot import name hashtable

ImportError Traceback (most recent call last)
in ()
----> 1 import pandas

C:\Python27\lib\site-packages\pandas__init__.py in ()
4
5 try:
----> 6 from . import hashtable, tslib, lib
7 except Exception: # pragma: no cover
8 import sys

@ghost
Copy link

ghost commented May 13, 2013

For windows users, a common cure is to go for packaged python distro such as EPD (now canopy) or anaconda.

Although vincenzooo reported problems with EPD. I'll reopen the issue if you want to dig in and find the cause.

@dirkjot
Copy link

dirkjot commented May 30, 2013

Hi , I got the same error on ubuntu 12.10: I had pandas 0.9 installed and did "pip install -upgrade pandas" , followed by a sudo version of the same. This gave me a pandas version that complained on import: "import pandas \n cannot import name hashtable" . I removed 0.12 and then installed v0.11 without a hitch. A transcript (last parts only) was saved on http://pastebin.com/U7AABUJp
ta, Dirk

@vincenzooo
Copy link
Author

The problem got solved, I am not sure how. I have recently updated from EPD to canopy and this updated several python components. I have now python 2.7.3. My former distribution was from 2010. It is working now.

@jtratner
Copy link
Contributor

jtratner commented Jul 6, 2013

This is the generic error that happens whenever there is an error in any of the pandas files that causes something to mess up in a way that isn't caught (e.g., something isn't compiled correctly or there's a syntax error or a missing dependency). It's misleading, but generally the best way to handle this is to recompile pandas (or make sure you're using the right compiler)

@vpereira
Copy link

vpereira commented Aug 6, 2014

I had the same problem and I can reproduce it. I'm running OpenSUSE 13.1. If I install the IPython distributed as package, via zypper, I receive this error with pandas (i tried from 0.11 - master). If I pip install IPython via pip, it works without problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms
Projects
None yet
Development

No branches or pull requests

5 participants