0
votes

I am getting an architecture error while importing any package, i understand my Python might not be compatible, can't understand it. Current Python Version - 2.7.10

`MyMachine:desktop *********$ python pythonmath.py Traceback (most recent call last): File "pythonmath.py", line 1, in import math ImportError: dlopen(/Users/*********/anaconda/lib/python2.7/lib-dynload/math.so, 2): no suitable image found. Did find: /Users/**********/anaconda/lib/python2.7/lib-dynload/math.so: mach-o, but wrong architecture MyMachine:desktop ***********$ python pythonmath.py Traceback (most recent call last): File "pythonmath.py", line 1, in import math ImportError: dlopen(/Users/anaconda/lib/python2.7/lib-dynload/math.so, 2): no suitable image found. Did find: /Users/***********/anaconda/lib/python2.7/lib-dynload/math.so: mach-o, but wrong architecture

2

2 Answers

1
votes

you are mixing 32bit and 64bit versions of python. probably you installed 64bit python version on a 32bit computer. go on and uninstall python and reinstall it with the right configuration.

1
votes

This issue is most probably due to messed up python installation. You can try uninstalling python from your os (Take this answer for help How to uninstall Python 2.7 on a Mac OS X 10.6.4?)

And reinstall python. This worked for me.