![]() ![]() An older version was installed in /usr/lib/python2.7 and the correct version was installed in /usr/local/lib/python2.7.Īdditionally, I had PYTHONPATH=/usr/lib/python2.7/dist-packages:/usr/local/lib/python2.7/dist-packages. It turned out to be a problem where I had multiple numpy packages installed. The error is reported by numpy's source code here numpy/core/code_generators/cversions.txt.I spent a long time trying to figure out which version of numpy is expected to be upgraded to when running into this error, and here is a list of numpy versions with their corresponding C API versions, which may be useful for troubleshooting such an issue: # 0x00000008 - 1.7.xĪnd the C API VERSION in numpy is tracked in three places according to : You may upgrade to a version that is too new/old for your environment. pip install numpy -upgradeīut which version of numpy should I upgrade to? Numpy official document suggests users to do upgrade to solve this issue. I had to add cv.py to the python2.7 folder in Spyder-Py2 is there something else I need to add? System Info: OS X El Capitan, Macbook Air, 1.3 GHz Intel Core i5, 8 GB 1600 HMz DDR3 RuntimeError: module compiled against API version a but this version of numpy is 9įile "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell/sitecustomize.py", line 685, in runfileįile "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/spyderlib/widgets/externalshell/sitecustomize.py", line 78, in execfileįile "/Users/isaiahnields/.spyder2/temp.py", line 9, in įile "/Applications/Spyder-Py2.app/Contents/Resources/lib/python2.7/cv.py", line 1, in Console: > runfile('/Users/isaiahnields/.spyder2/temp.py', wdir='/Users/isaiahnields/.spyder2') ![]()
0 Comments
Leave a Reply. |