https://github.com/nixtla logo
#general
Title
# general
f

Francisco

10/11/2023, 12:43 AM
Copy code
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
File __init__.pxd:942, in numpy.import_array()

RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf . Check the section C-API incompatibility at the Troubleshooting ImportError section at <https://numpy.org/devdocs/user/troubleshooting-importerror.html#c-api-incompatibility> for indications on how to solve this problem .

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
Cell In[10], line 22
     20 from statsforecast import StatsForecast
     21 from datasetsforecast.losses import mse, mae, rmse
---> 22 from statsforecast.models import (
     23      AutoARIMA,
     24      HoltWinters,
     25      CrostonClassic as Croston, 
     26      HistoricAverage,
     27      DynamicOptimizedTheta as DOT,
     28      SeasonalNaive,
     29      AutoTheta,
     30      MSTL
     31  )

File ~\.conda\envs\Merck2\lib\site-packages\statsforecast\models.py:21
     18 from numba import njit
     19 from scipy.optimize import minimize
---> 21 from .arima import auto_arima_f, forecast_arima, fitted_arima
     22 from .ces import auto_ces, forecast_ces
     23 from .ets import ets_f, forecast_ets

File ~\.conda\envs\Merck2\lib\site-packages\statsforecast\arima.py:16
     14 import numpy as np
     15 import pandas as pd
---> 16 import statsmodels.api as sm
     17 from numba import njit
     18 from scipy.optimize import minimize

File ~\AppData\Roaming\Python\Python310\site-packages\statsmodels\api.py:125
    114 from .genmod import api as genmod
    115 from .genmod.api import (
    116     GEE,
    117     GLM,
   (...)
    123     families,
    124 )
--> 125 from .graphics import api as graphics
    126 from .graphics.gofplots import ProbPlot, qqline, qqplot, qqplot_2samples
    127 from .imputation.bayes_mi import MI, BayesGaussMI

File ~\AppData\Roaming\Python\Python310\site-packages\statsmodels\graphics\api.py:9
      7 from .gofplots import qqplot
      8 from .plottools import rainbow
----> 9 from .regressionplots import (
     10     abline_plot,
     11     influence_plot,
     12     plot_ccpr,
     13     plot_ccpr_grid,
     14     plot_fit,
     15     plot_leverage_resid2,
     16     plot_partregress,
     17     plot_partregress_grid,
     18     plot_regress_exog,
     19 )
     21 __all__ = [
     22     "abline_plot",
     23     "beanplot",
   (...)
     42     "violinplot",
     43 ]

File ~\AppData\Roaming\Python\Python310\site-packages\statsmodels\graphics\regressionplots.py:23
     21 from statsmodels.genmod.generalized_linear_model import GLM
     22 from statsmodels.graphics import utils
---> 23 from statsmodels.nonparametric.smoothers_lowess import lowess
     24 from statsmodels.regression.linear_model import GLS, OLS, WLS
     25 from statsmodels.sandbox.regression.predstd import wls_prediction_std

File ~\AppData\Roaming\Python\Python310\site-packages\statsmodels\nonparametric\smoothers_lowess.py:11
      2 """Lowess - wrapper for cythonized extension
      3 
      4 Author : Chris Jordan-Squire
   (...)
      7 
      8 """
     10 import numpy as np
---> 11 from ._smoothers_lowess import lowess as _lowess
     13 def lowess(endog, exog, frac=2.0/3.0, it=3, delta=0.0, xvals=None, is_sorted=False,
     14            missing='drop', return_sorted=True):
     15     '''LOWESS (Locally Weighted Scatterplot Smoothing)
     16 
     17     A lowess function that outs smoothed estimates of endog
   (...)
    135 
    136     '''

File statsmodels\nonparametric\_smoothers_lowess.pyx:22, in init statsmodels.nonparametric._smoothers_lowess()

File __init__.pxd:944, in numpy.import_array()

ImportError: numpy.core.multiarray failed to import
now i am getting this error
j

José Morales

10/11/2023, 1:20 AM
seems like your numpy installation is broken now. How did you create your environment?
f

Francisco

10/11/2023, 2:48 AM
through anaconda, i selected python 3.10.13 that is compatible with nxtlas libraries
5 Views