ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C heade

  • Post author:
  • Post category:其他


/usr/local/lib/python3.7/site-packages/empyrical/utils.py:32: UserWarning: Unable to import pandas_datareader. Suppressing import error and continuing. All data reading functionality will raise errors; but has been deprecated and will be removed in a later version.

warnings.warn(msg)

/usr/local/lib/python3.7/site-packages/pyfolio/pos.py:27: UserWarning: Module “zipline.assets” not found; mutltipliers will not be applied to position notionals.

‘Module “zipline.assets” not found; mutltipliers will not be applied’ +

Traceback (most recent call last):

from pyfolio import timeseries

File “/usr/local/lib/python3.7/site-packages/pyfolio/

init

.py”, line 13, in

from .tears import * # noqa

File “/usr/local/lib/python3.7/site-packages/pyfolio/tears.py”, line 28, in

from . import _seaborn as sns

File “/usr/local/lib/python3.7/site-packages/pyfolio/_seaborn.py”, line 18, in

from seaborn import * # noqa

File “/usr/local/lib/python3.7/site-packages/seaborn/

init

.py”, line 9, in

from .regression import *

File “/usr/local/lib/python3.7/site-packages/seaborn/regression.py”, line 27, in

from .axisgrid import FacetGrid, _facet_docs

File “/usr/local/lib/python3.7/site-packages/seaborn/axisgrid.py”, line 16, in

from .distributions import distplot, kdeplot, _freedman_diaconis_bins

File “/usr/local/lib/python3.7/site-packages/seaborn/distributions.py”, line 13, in

import statsmodels.nonparametric.api as smnp

File “/usr/local/lib/python3.7/site-packages/statsmodels/nonparametric/api.py”, line 7, in

from .kde import KDEUnivariate

File “/usr/local/lib/python3.7/site-packages/statsmodels/nonparametric/kde.py”, line 23, in

from .linbin import fast_linbin

File “statsmodels/nonparametric/linbin.pyx”, line 1, in init statsmodels.nonparametric.linbin

ValueError: numpy.ufunc size changed, may indicate binary incompatibility. Expected 216 from C header, got 192 from PyObject

解决方法:

发现竟然是numpy版本过低的缘故,附上卸载,安装,升级numpy的终端命令:

sudo  pip uninstall numpy

sudo pip install numpy==1.14.5

sudo pip install –upgrade numpy



版权声明:本文为aa5305123原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。