1

I installed 64 bit background geoprocessing on my ArcGIS 10.2.2 and then changed my pythonpath to "C:\Python27\ArcGISx6410.2" so that my code can benefit from the 64bit. then I had to install a 64b Scipy, this lead into an error as follows:

RuntimeError: module compiled against API version 9 but this version of numpy is 7
Traceback (most recent call last):

File "C:\Users\Ehsan.abdolmajidi\workspace\ArcPy_matching\NVDB_Matching_v18_H_4\Runner_v18_H.py", line 6, in <module>
from roundabout import *
    File "C:\Users\Ehsan.abdolmajidi\workspace\ArcPy_matching\NVDB_Matching_v18_H_4\roundabout.py", line 8, in <module>
from scipy import spatial
    File "C:\Python27\ArcGISx6410.2\Lib\site-packages\scipy\spatial\__init__.py", line 89, in <module>
from .kdtree import *
    File "C:\Python27\ArcGISx6410.2\Lib\site-packages\scipy\spatial\kdtree.py", line 8, in <module>
import scipy.sparse
    File "C:\Python27\ArcGISx6410.2\Lib\site-packages\scipy\sparse\__init__.py", line 206, in <module>
from .csr import *
    File "C:\Python27\ArcGISx6410.2\Lib\site-packages\scipy\sparse\csr.py", line 13, in <module>
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
ImportError: numpy.core.multiarray failed to import"

now I am trying to install a new 64 numpy but I can't find a .exe file. .whl file needs pip which when I try to install return new error: "no module named _socket "

do you know if I can find a version 9 of 64 bit Numpy which is .exe? or do you know how I can fix the first problem?

Answer: I solved the problem by updating the numpy. the problem was that I installed the SciPy which was not compatible with the numpy embedded in the 64 background geoprocessing.

2

This is a known issue. The current version of scipy (actually numpy) is not compatible with python distribution that comes with ArcGIS, although theoretically they should. The core reason is that scipy is not pure Python (for speed) and hence it matters which API against which things have been compiled.

I had that issue and I never found a compatible (older) scipy installer. I solved it by copying my Python x64 installation (from ArcGIS) which I had an older version of scipy included in it in the past and replaced the folder you mentioned with that.

  • I did not exactly get the last part. The previous version of my code was written in 32bit (everything, Scipy, Numpy and Arcpy). – msc87 Jan 28 '15 at 13:40
  • Unless you do something specific (eg need a specific precision), your Python code is not 32 or 64 bit specific. I understand that you might not have access to an older version. I just happened to have it since I had a server installation which had x64 arcpy and scipy happily working from an older scipy installation. If you do not have access to such installation, I might be able to basically zip and send mine for you (worked for me from one machine to other). I am not sure about the legality of it though. – Mahdi Jan 29 '15 at 0:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.