我正在尝试从pmdarima.arima导入auto_arima运行。它给我一个错误numpy.ufunc大小更改,可能表明二进制不兼容。预期从C标头获得216,从PyObject获得192
安装pmdarima!pip安装pmdarima
Requirement already up-to-date: pmdarima in /usr/local/envs/py3env/lib/python3.5/site-packages (1.6.0)
Requirement already satisfied, skipping upgrade: numpy>=1.17.3 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (1.18.4)
Requirement already satisfied, skipping upgrade: pandas>=0.19 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (0.22.0)
Requirement already satisfied, skipping upgrade: urllib3 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (1.22)
Requirement already satisfied, skipping upgrade: scikit-learn>=0.22 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (0.22.2.post1)
Requirement already satisfied, skipping upgrade: scipy>=1.3.2 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (1.4.1)
Requirement already satisfied, skipping upgrade: Cython>=0.29 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (0.29.17)
Requirement already satisfied, skipping upgrade: statsmodels>=0.10.2 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (0.11.1)
Requirement already satisfied, skipping upgrade: joblib>=0.11 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pmdarima) (0.14.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2 in /usr/local/envs/py3env/lib/python3.5/site-packages (from pandas>=0.19->pmdarima) (2.5.0)
Requirement already satisfied, skipping upgrade: pytz>=2011k in /usr/local/envs/py3env/lib/python3.5/site-packages (from pandas>=0.19->pmdarima) (2018.4)
Requirement already satisfied, skipping upgrade: patsy>=0.5 in /usr/local/envs/py3env/lib/python3.5/site-packages (from statsmodels>=0.10.2->pmdarima) (0.5.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in /usr/local/envs/py3env/lib/python3.5/site-packages (from python-dateutil>=2->pandas>=0.19->pmdarima) (1.10.0)
numpy也被更新。
似乎是issue with numpy。您需要降级到1.16.1版本。
!pip install numpy==1.16.1
然后您需要重新启动内核,以使更改生效
import os
os._exit(00)