I was trying to import scipy.stats, however keep getting the error of 'ImportError: cannot import name ellipkm1'
Here's the complete track record of the error:
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
File "C:\Python27\ArcGIS10.2\lib\site-packages\scipy\stats\__init__.py", line 321, in <module>
from .stats import *
File "C:\Python27\ArcGIS10.2\lib\site-packages\scipy\stats\stats.py", line 180, in <module>
import scipy.special as special
File "C:\Python27\ArcGIS10.2\lib\site-packages\scipy\special\__init__.py", line 603, in <module>
from .basic import *
File "C:\Python27\ArcGIS10.2\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
So what should I do to fix this problem?
I had to upgrade:
pip install scipy --upgrade
to scipy==0.16.1 to make it work. Note that I had uninstalled scipy from root and installed it in a virtualenv.
Also, If you want to use the same version of scipy, you can run:
pip install -U --force-reinstall scipy
I had scipy==0.15.1 and the command above fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With