这个问题已经在这里有了答案: > Installing scipy in Python 3.5 on 32-bit Windows 7 Machine 4个
我的Python版本在win32上是3.5.
我从这里成功安装了Numpy MKL,Scipy和Statsmodels
http://www.lfd.uci.edu/~gohlke/pythonlibs/
但是,当我跑步时
import statsmodels as sm
我收到以下错误:
Traceback (most recent call last):
File "D:\Python\Innovation\try\Try_Reg.py", line 6, in <module>
import statsmodels as sm
File "C:\Python35\lib\site-packages\statsmodels\__init__.py", line 8, in <module>
from .tools.sm_exceptions import (ConvergenceWarning, CacheWriteWarning, File "C:\Python35\lib\site-packages\statsmodels\tools\__init__.py", line 1, in <module>
from .tools import add_constant, categorical File "C:\Python35\lib\site-packages\statsmodels\tools\tools.py", line 9, in <module>
from statsmodels.distributions import (ECDF, monotone_fn_inverter, File "C:\Python35\lib\site-packages\statsmodels\distributions\__init__.py", line 1, in <module>
from .empirical_distribution import ECDF, monotone_fn_inverter, StepFunction File "C:\Python35\lib\site-packages\statsmodels\distributions\empirical_distribution.py", line 5, in <module>
from scipy.interpolate import interp1d File "C:\Python35\lib\site-packages\scipy\interpolate\__init__.py", line 145, in <module>
from .interpolate import * File "C:\Python35\lib\site-packages\scipy\interpolate\interpolate.py", line 16, in <module>
import scipy.special as spec File "C:\Python35\lib\site-packages\scipy\special\__init__.py", line 601, in <module>
from ._ufuncs import * File "scipy\special\_ufuncs.pyx", line 1, in init scipy.special._ufuncs (scipy\special\_ufuncs.c:26071)
ImportError: DLL load failed: The specified module could not be found.
我怎样才能解决这个问题?
解决方法:
尝试从https://www.microsoft.com/en-us/download/details.aspx?id=48145安装Visual C Redistributable