Hi Edward,
thanks for your patience and advice.
% locate python | grep '\/python$\|\/python...$' | grep bin | xargs -I
% echo % -c "\"import numpy; print(numpy.__version__)\""
I am not sure what these two commands were supposed to return; I assume
a list of numpy versions. Something in the syntax goes wrong there. I
tried a number of different variations of brackets and quotes, but
nothing conclusive came out.
[gre:~] paul% locate python | grep '\/python$\|\/python...$' | grep bin |
xargs -I
xargs: option requires an argument -- I
usage: xargs [-0opt] [-E eofstr] [-I replstr [-R replacements]] [-J replstr]
[-L number] [-n number [-x]] [-P maxprocs] [-s size]
[utility [argument ...]]
[gre:~] paul% echo % -c "\"import numpy; print(numpy.__version__)\""
Unmatched ".
[gre:~] paul% echo % -c \"import numpy ; print ( numpy.__version__ ) \"
Badly placed ()'s.
Anyways.
Importing numpy and scipy into the python version
(/usr/local/bin/python) is indeed a problem. Here is certainly the
reason why relax does not find numpy. See below the ImportErrors.
(If I use my standard python, I have numpy...
[gre:~] paul% which python
python: aliased to
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python
[gre:~] paul% python
Python 2.7.5 (default, Jun 27 2013, 19:56:45)
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy
exit()
wx works, though.
[gre:~] paul% /usr/local/bin/python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy;print(numpy.__version__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py",
line 137, in <module>
import add_newdocs
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py",
line 9, in <module>
from numpy.lib import add_newdoc
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py",
line 4, in <module>
from type_check import *
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py",
line 8, in <module>
import numpy.core.numeric as _nx
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py",
line 5, in <module>
import multiarray
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so,
2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so:
no matching architecture in universal wrapper
import nump
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named nump
import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py",
line 137, in <module>
import add_newdocs
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py",
line 9, in <module>
from numpy.lib import add_newdoc
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py",
line 4, in <module>
from type_check import *
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py",
line 8, in <module>
import numpy.core.numeric as _nx
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py",
line 5, in <module>
import multiarray
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so,
2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so:
no matching architecture in universal wrapper
exit
Use exit() or Ctrl-D (i.e. EOF) to exit
exit()
[gre:~] paul% /usr/local/bin/python
Python 2.7.5 (v2.7.5:ab05e7dd2788, May 13 2013, 13:18:45)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import numpy; print(numpy.__version__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py",
line 137, in <module>
import add_newdocs
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py",
line 9, in <module>
from numpy.lib import add_newdoc
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py",
line 4, in <module>
from type_check import *
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py",
line 8, in <module>
import numpy.core.numeric as _nx
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py",
line 5, in <module>
import multiarray
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so,
2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so:
no matching architecture in universal wrapper
import scipy; print(scipy.__version__)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/__init__.py",
line 70, in <module>
from numpy import show_config as show_numpy_config
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py",
line 137, in <module>
import add_newdocs
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py",
line 9, in <module>
from numpy.lib import add_newdoc
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py",
line 4, in <module>
from type_check import *
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py",
line 8, in <module>
import numpy.core.numeric as _nx
File
"/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py",
line 5, in <module>
import multiarray
ImportError:
dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so,
2): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so:
no matching architecture in universal wrapper
import wx; print(wx.__version__)
2.9.4.0
Now I could either use a different version of python for relax (I guess
you would not recommend), or place numpy into the right path. I should
rather try the latter.
Hopefully one of these will work. Oh, also make sue that the Python
version printed out matches the DMG file you recently downloaded
exactly, just in case /usr/local/bin/python is a symbolic link to a
different Python version :S Maybe also type:
% ls -alh /usr/local/bin/python
and make sure that the date on that symlink is less than a day old,
and that it points to
/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7.
This seems to be ok:
[gre026248:~] paul% ls -alh /usr/local/bin/python
lrwxr-xr-x 1 root wheel 68B 8 Aug 22:52 /usr/local/bin/python ->
../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python
However, the fact that the owner is root may be a problem.
Unfortunately, a chown does not solve the issue:
[gre:/Users/paul] root# chown paul /usr/local/bin/python
[gre:/Users/paul] root# ls -alh /usr/local/bin/python
lrwxr-xr-x 1 root wheel 68B 8 Aug 22:52 /usr/local/bin/python ->
../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python
I still hesitate to compile numpy from source.
I might do so, though, especially if nothing else works.
cheers,
paul