I use Anaconda3@windows
to import scipy(v1.0.0)
but I have an error when compiling. I have checked other similar cases online but found no solution, does anyone have any idea?
import numpy as np
import scipy
The error msg
ImportError
Traceback (most recent call
last) <ipython-input-12-eb63b9337447> in <module>()
1 import numpy as np
----> 2 import scipy
~\AppData\Roaming\Python\Python36\site-packages\scipy\__init__.py in
<module>()
116 del _NumpyVersion
117
--> 118 from scipy._lib._ccallback import LowLevelCallable
119
120 from scipy._lib._testutils import PytestTester
~\AppData\Roaming\Python\Python36\site-packages\scipy\_lib\_ccallback.py
in <module>()
----> 1 from . import _ccallback_c
2
3 import ctypes
4
5 PyCFuncPtr = ctypes.CFUNCTYPE(ctypes.c_void_p).__bases__[0]
ImportError: cannot import name '_ccallback_c'
I had the same issue and tried all recommended solutions (re-install in many different ways), but nothing worked. What helped a lot is to read documentation more carefully (https://www.scipy.org/install.html) In my case, scipy library also required some latest versions of other libraries to be installed, so I run: python -m pip install numpy scipy matplotlib ipython jupyter pandas sympy nose
Now everything works fine.
Solution found!
That's it!
Agree with Daria Simonova, try
conda update numpy scipy matplotlib ipython jupyter pandas sympy nose
in case you are using Anaconda.
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