python - ValueError: numpy.dtype has the wrong size, try recompiling -


i installed pandas , statsmodels package on python 2.7 when tried "import pandas pd", error message comes out. can help? thanks!!!

numpy.dtype has wrong size, try recompiling traceback (most recent call last):   file "<stdin>", line 1, in <module>   file "c:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\formula\__init__.py", line 4, in <module>     formulatools import handle_formula_data   file "c:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\formula\formulatools.p y", line 1, in <module>     import statsmodels.tools.data data_util   file "c:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\tools\__init__.py", li ne 1, in <module>     tools import add_constant, categorical   file "c:\analytics\ext\python27\lib\site-packages\statsmodels-0.5.0-py2.7-win32.egg\statsmodels\tools\tools.py", line 14, in <module>     pandas import dataframe   file "c:\analytics\ext\python27\lib\site-packages\pandas\__init__.py", line 6, in <module>     . import hashtable, tslib, lib   file "numpy.pxd", line 157, in init pandas.tslib (pandas\tslib.c:49133) valueerror: numpy.dtype has wrong size, try recompiling 

(to expand bit on comment)

numpy developers follow in general policy of keeping backward compatible binary interface (abi). however, abi not forward compatible.

what means:

a package, uses numpy in compiled extension, compiled against specific version of numpy. future version of numpy compatible compiled extension of package (for exception see below). distributers of other packages not need recompile package against newer versions of numpy , users not need update these other packages, when users update newer version of numpy.

however, not go in other direction. if package compiled against specific numpy version, 1.7, there no guarantee binaries of package work older numpy versions, 1.6, , or of time not.

the binary distribution of packages pandas , statsmodels, compiled against recent version of numpy, not work when older version of numpy installed. packages, example matplotlib, if remember correctly, compile extensions against oldest numpy version support. in case, users same old or more recent version of numpy can use binaries.

the error message in question typical result of binary incompatibilities.

the solution binary compatible version, either updating numpy @ least version against pandas or statsmodels compiled, or recompile pandas , statsmodels against older version of numpy installed.

breaking abi backward compatibility:

sometimes improvements or refactorings in numpy break abi backward compatibility. happened (unintentionally) numpy 1.4.0. consequence, users updated numpy 1.4.0, had binary incompatibilities other compiled packages, compiled against previous version of numpy. requires packages binary extensions use numpy have recompiled work abi incompatible version.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -