Pandas import error when using PyCharm debugger

When I run code in debug mode I can't seem to import the pandas module. I get this error rear happens at the import pandas line in the code.

/Users/zaaaa/Library/Enthought/Canopy_64bit/System/bin/python2.7 /Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py --multiproc --save-signatures --qt-support --client 127.0.0.1 --port 50419 --file /Users/zaaaa/Documents/Svn/xxx/Workproduct/yyy/zzz/main.py
pydev debugger: process 3030 is connecting

Connected to pydev debugger (build 145.1504)
>>> import pandas
WARNING: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
Python 2.7.10 | 64-bit | (default, Oct 21 2015, 09:09:19)
Type "copyright", "credits" or "license" for more information.

IPython 2.4.1 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
Traceback (most recent call last):
File "build/bdist.macosx-10.6-x86_64/egg/IPython/core/interactiveshell.py", line 2883, in run_code
File "<ipython-input-1-d6ac987968b6>", line 1, in <module>
import pandas
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "/Users/z398911/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pandas/__init__.py", line 25, in <module>
from pandas import hashtable, tslib, lib
File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "pandas/src/numpy.pxd", line 157, in init pandas.hashtable (pandas/hashtable.c:38509)
ValueError: numpy.dtype has the wrong size, try recompiling

 

When I run the import from the interactive shell (without the debugger running) it works OK.

Python 4.1.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
PyDev console: using IPython 4.1.2

import sys; print('Python %s on %s' % (sys.version, sys.platform))
sys.path.extend(['/Users/z398911/Documents/Svn/Verizon/Workproduct/EON-IOT/outage_browser'])

Python 2.7.10 | 64-bit | (default, Oct 21 2015, 09:09:19)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.6)] on darwin
In[2]: import pandas
Backend Qt4Agg is interactive backend. Turning interactive mode on.
In[3]: pandas.__version__
Out[3]: u'0.18.0'

Does anyone have any idea why there is an error here? Is it somehow related to the interactive debugger connection?

Thanks in advance,

PJM

0
1 comment

Hi! Thank you for the feedback! It looks like a bug in PyCharm, I've created an issue in our bugtracker: https://youtrack.jetbrains.com/issue/PY-20274

0

Please sign in to leave a comment.