[wingide-users] Problem with "pandas" on Mac OS X Lion

Trevor T tsnipez at gmail.com
Wed Feb 5 12:53:31 EST 2014

Unfortunately, it seems that both sys.path and os.getcwd() return the same
result whether I'm in Wing or just the regular python terminal.

Specifically sys.path returns:

['', '/Users/owner/anaconda/lib/python27.zip',

and os.getcwd() returns:


I checked if the two lists were equivalent generated by two different
shells and they were.  Now the other thing I didn't mention is that the
hashtable error is the only *consistent* error associated with importing
pandas.  What I mean, is that if I just launch Wing IDE and try to import
pandas - I will always first get this error instead:
http://pastebin.com/raw.php?i=XnZ2K0Lp - but when I try to import pandas
again from that same shell is what I get the hashtable error and will
forever keep getting if I try to import pandas from the same terminal
session.  I couldn't find the particular first error anywhere on Google so
I just assumed that the second, consistent error is all that matters.

Thank you for the help!

On Wed, Feb 5, 2014 at 10:26 AM, Wingware Support <support at wingware.com>wrote:

> Trevor T wrote:
>> As a long-time Wing fan, I have been struggling lately how to solve an
>> issue I keep having when trying to import the "pandas" module (
>> http://pandas.pydata.org/ ) in either the Python shell or my projects on
>> my Max OS X Lion machine.
>> This is what a typical import in the shell looks like:
>> ********************
>> import pandas
>> cannot import name hashtableTraceback (most recent call last):
>>   File "/Applications/WingIDE.app/Contents/MacOS/src/debug/tserver/_sandbox.py",
>> line 1, in <module>
>>     # Used internally for debug sandbox under external interpreter
>>   File "/Library/Python/2.7/site-packages/pandas-0.13.0_395_
>> gef55e60-py2.7-macosx-10.9-intel.egg/pandas/__init__.py", line 16, in
>> <module>
>>     from . import hashtable, tslib, lib
>> ImportError: cannot import name hashtable
>> ********************
>> The strange thing is that this error only occurs within WingIDE. If I
>> open up a terminal, launch Python, and then import pandas - everything
>> works smoothly and no error occurs.
>> Now after some Googling, I'm not the first to run into this error but it
>> appears I am the first to run into it within Wing.  Here is a StackOverflow
>> thread describing the problem: http://dr.tl/0e180 - the thing is they
>> seem to have been having the problem within plain old python, instead of
>> just Wing, and it was resolved by just changing the directory from the
>> pandas source directory.  To my knowledge, I'm not in the pandas source
>> directory within the default python shell in Wing or any of my projects.
>>  So I'm not sure how this relates to the Wing configuration?
>> Now admittedly, I haven't compiled pandas myself, and instead am relying
>> on other composite packages.  I have tested both "anaconda" and
>> "ScipySuperPack" with the same results.
>> Any ideas?  Any help would be more than appreciated.
> Try comparing sys.path and os.getcwd() in the two cases (inside and not
> inside Wing).  Most relevant would be whether '.' is in sys.path, and/or
> you need to set the Initial Directory under the Debug/Execute tab in
> Project Properties.  If you need to alter Python Path you can also do that
> in the same dialog under the Environment tab.
> My guess from the SO item you reference is that you may just need to set
> the Initial Directory property in Wing.
> --
> Stephan Deibel
> Wingware | Python IDE
> Advancing Software Development
> www.wingware.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/wingide-users/attachments/20140205/d1ef1cf1/attachment.html>

More information about the wingide-users mailing list