I created me a new environment in Anaconda with the only two additional package ‘statsmodel’.
Python version is 3.9.12 and statsmodels version 0.14.0.
I additinally installed Spyder for this in version: 5.4.3 (conda). Operating System: Windows 10
Now I tried to import statsmodel (import statsmodels.api as sm) and get the following error:
ImportError: DLL load failed while importing _ufuncs.
When I executed this import statement in Jupyter notebook it works fine.
So it seems to be a Spyder related issue.
Thanks for any help on this.
Thank you for the information that was useful to help you better, please launch these commands and verify if you are still seeing errors in the terminal.
conda create -n spyder-cf -c conda-forge spyder
conda activate spyder-cf
spyder
Let us know if that fixes your problem and if not please let us know and send us the output.
Thank You,
Thanks for your help. This did not solce the problem; same issue:
Traceback (most recent call last):
Cell In[1], line 1
import statsmodels.api as sm
File ~\Anaconda3\envs\stats\lib\site-packages\statsmodels\api.py:72
from . import datasets, distributions, iolib, regression, robust, tools
File ~\Anaconda3\envs\stats\lib\site-packages\statsmodels\distributions_init_.py:2
from .empirical_distribution import ECDF, monotone_fn_inverter, StepFunction
File ~\Anaconda3\envs\stats\lib\site-packages\statsmodels\distributions\empirical_distribution.py:5
from scipy.interpolate import interp1d
File ~\Anaconda3\envs\stats\lib\site-packages\scipy\interpolate_init_.py:167
from ._interpolate import *
File ~\Anaconda3\envs\stats\lib\site-packages\scipy\interpolate_interpolate.py:8
import scipy.special as spec
File ~\Anaconda3\envs\stats\lib\site-packages\scipy\special_init_.py:663
from . import _ufuncs
ImportError: DLL load failed while importing _ufuncs: Die angegebene Prozedur wurde nicht gefunden.
After restarting the error was gone. So your advice helped. Thanks.
Regards