Alex Z
Alex Z

Reputation: 13

ImportError: cannot import name 'ellipkm1'

I've seen some answers to my issue, but none seem sufficiently applicable. Here's my issue: I'm by no means a Python expert, but am trying to experiment with a fairly complex Python package. (Don't ask...) When I try to import something I need to move forward, I get the following error (IDLE output):

import scipy.special as special
Traceback (most recent call last):
  File "<pyshell#16>", line 1, in <module>
import scipy.special as special
 File "C:\DevTools\Python35\lib\site-packages\scipy\special\__init__.py", line 629, in <module>
from .basic import *
File "C:\DevTools\Python35\lib\site-packages\scipy\special\basic.py", line 14, in <module>
from ._ufuncs import (ellipkm1, mathieu_a, mathieu_b, iv, jv, gamma, psi, zeta,
ImportError: cannot import name 'ellipkm1'

My environment:

Along the way I've had to reverse-engineer failed DLL loads, missing runtime DLLs, etc, but seemingly all of these have now been resolved--yet I still get the darn error above.

Any help would be greatly appreciated. Sorry if I've missed any information that may be helpful in troubleshooting this.

Thanks in advance.

Upvotes: 1

Views: 2427

Answers (1)

MattDMo
MattDMo

Reputation: 102842

As indicated at the top of Dr. Gohlke's excellent page, he writes

Many binaries depend on NumPy-1.10+MKL ...

and the scipy section states:

Requires numpy+mkl and optionally pillow.

I suspect there's a linking issue hidden somewhere where somebody is trying to call an MKL function and it can't be found, hence the module fails to load. It certainly wouldn't hurt to install the numpy wheel to see if that's the case.

Also, your import can simply be:

from scipy import special

Upvotes: 1

Related Questions