0

Set-up: OS: Win8.1 64bit, IDE: JetBrains PyCharm, Python: 3.5, SciPy and NumPy: cp35 64bit whl files installed using pip

Code:

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()

Error report:

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

I can follow the error to _unfuncs.pyx file but I have no idea how to rectify that. Help is appreciated. Thank you.

algoProg
  • 718
  • 2
  • 11
  • 27
  • You can search stackoveflow first to find answers to similar questions, eg https://stackoverflow.com/questions/33600302/installing-scipy-in-python-3-5-on-32-bit-windows-7-machine – pv. Nov 13 '15 at 14:57
  • Sorry for duplicate question. Missing VC++ files helped. I used the search here but I will be more exhaustive next time. Thank you. – algoProg Nov 13 '15 at 15:09

0 Answers0