Из scipy.interpolate import UnivariateSpline: Importerror
Установка: ОС: Win8.1 64bit, IDE: JetBrains PyCharm, Python: 3.5, SciPy и NumPy: cp35 64-битные whl файлы, установленные с помощью pip
Код:
import numpy as np
from scipy.interpolate import UnivariateSpline
from matplotlib import pyplot as plt
N = 1000
n = N/10
s = np.random.normal(size=N) # generate your data sample with N elements
p, x = np.histogram(s, bins=n) # bin it into n = N/10 bins
x = x[:-1] + (x[1] - x[0])/2 # convert bin edges to centers
f = UnivariateSpline(x, p, s=n)
plt.plot(x, f(x))
plt.show()
Сообщение об ошибке:
C:\Users\gakadam\AppData\Local\Programs\Python\Python35\python.exe C:/Users/gakadam/PycharmProjects/pdf_curve/main.py
Traceback (most recent call last):
File "C:/Users/gakadam/PycharmProjects/pdf_curve/main.py", line 2, in <module>
from scipy.interpolate import UnivariateSpline
File "C:\Users\gakadam\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\interpolate\__init__.py", line 145, in <module>
from .interpolate import *
File "C:\Users\gakadam\AppData\Local\Programs\Python\Python35\lib\site-packages\scipy\interpolate\interpolate.py", line 16, in <module>
import scipy.special as spec
File "C:\Users\gakadam\AppData\Local\Programs\Python\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.
Process finished with exit code 1
Я могу проследить ошибку до файла _unfuncs.pyx, но я не знаю, как это исправить. Помощь приветствуется. Спасибо.