SciPy Error: cannot import name callback c

8710
8
Jump to solution
05-08-2018 05:22 AM
ShouvikJha
Occasional Contributor III

I am installing SciPy on Windows 7 64 bit. I am using  ArcGIS 10.3 and default NumPy version 1.7.1 and I downloaded the SciPy version 1.1.0 from Python libs. After stored in the site package of Python folder When I executing the Scipy, I am getting following error.   

Earlier I installed the SciPy in the same way which I follow now, but now it's returning the error msg. 

type "copyright", "credits" or "license()" for more information.
 >>> import numpy
 >>> import scipy
 Traceback (most recent call last):
 File "<pyshell#1>", line 1, in <module>
 import scipy
 File "C:\Python27\ArcGIS10.3\lib\site-packages\scipy\__init__.py", line 119, in <module>
 from scipy._lib._ccallback import LowLevelCallable
 File "C:\Python27\ArcGIS10.3\lib\site-packages\scipy\_lib\_ccallback.py", line 1, in <module>
 from . import _ccallback_c
 ImportError: cannot import name _ccallback_c

 

0 Kudos
1 Solution

Accepted Solutions
XanderBakker
Esri Esteemed Contributor

Scrolling through the links provided by Dan Patterson‌, and some support pages I noticed this:

I do however, strongly recommend you to update to a more recent version of ArcGIS and if you can as Dan Patterson suggested install ArcGIS Pro which already has SciPy included. Follow the steps described in several blogs by Dan on how to install Spyder with ArcGIS Pro:

And don't forget to check out this extremely rich resource: /blogs/dan_patterson/2016/05/09/the-links 

View solution in original post

8 Replies
DanPatterson_Retired
MVP Emeritus

check that that version of scipy supports that version of numpy.  Scipy tends to be a dot version behind numpy, not the otherway around.. 

Your best bet to keep everything working is to install PRO since it contains a clean happy, gets-along version of python (3.6), numpy and scipy.

ShouvikJha
Occasional Contributor III

Dan Patterson‌ I have downloaded several version of Scipy i.e. 0.18, 1.1 but it's producing the same error. May I please know the compatible version of scipy with 1.7.1 Numpy version. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

NumPy is currently in version 1.14.x

ArcGIS PRO uses  '1.13.3'

I don't even know what year numpy 1.7.1 was released.

BUT https://www.scipy.org/ is you want to go back... Past News on that page seems to be the spot

ShouvikJha
Occasional Contributor III

I have tried using the lower version of Scipy I.e 0.17.0, 0.17.1 etc, but it's producing the another error

Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import scipy
File "C:\Python27\ArcGIS10.3\lib\site-packages\scipy\__init__.py", line 103, in <module>
raise ImportError(msg)
ImportError: Error importing scipy: you cannot import scipy while
being in scipy source directory; please exit the scipy source
tree first, and relaunch your python intepreter.
0 Kudos
DanPatterson_Retired
MVP Emeritus

The message  means that you have to start python in the python folder.  You are currently located in the scipy folder and you can't import spyder that way...

Are you not using a python IDE or are you trying to run stuff  from the command prompt?  Open a python ide, load and compile and run your script from there

0 Kudos
XanderBakker
Esri Esteemed Contributor

Scrolling through the links provided by Dan Patterson‌, and some support pages I noticed this:

I do however, strongly recommend you to update to a more recent version of ArcGIS and if you can as Dan Patterson suggested install ArcGIS Pro which already has SciPy included. Follow the steps described in several blogs by Dan on how to install Spyder with ArcGIS Pro:

And don't forget to check out this extremely rich resource: /blogs/dan_patterson/2016/05/09/the-links 

ShouvikJha
Occasional Contributor III

Hi Xander Bakker‌ Thank you. I have solved the issue by installing SciPy version 1.6 windows executable file. 

DanPatterson_Retired
MVP Emeritus

glad to see that the version was found... you should still upgrade since a lot has been changed/improved in subsequent versions of all the solftware involved