だから@torek、あなたは私を正しい車線に乗せました。
→ ls -l /usr/bin/python*
どちらが与える
-rwxr-xr-x 2 root 62 2011-08-15 21:09 /usr/bin/python*
-rwxr-xr-x 6 root 1 2011-08-15 21:09 /usr/bin/python-config*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.5-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.6-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/python2.7-config -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config*
-rwxr-xr-x 2 root 62 2011-08-15 21:09 /usr/bin/pythonw*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/pythonw2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw2.5*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/pythonw2.6 -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6*
lrwxr-xr-x 1 root 1 2011-08-15 21:09 /usr/bin/pythonw2.7 -> ../../System/Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7*
よし、やってみよう
→ /usr/bin/python
そして、私たちは得る
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:06)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lxml import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/lxml/etree.so, 2): Symbol not found: _htmlParseChunk
Referenced from: /Library/Python/2.7/site-packages/lxml/etree.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/lxml/etree.so
>>>
それからもう一つ
→ /System/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7
そして、私たちは得る
Python 2.7.1 (r271:86832, Jun 16 2011, 16:59:05)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from lmxl import etree
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named lmxl
>>>
ああ、さらに悪いことに… :) python3 は /usr/local/bin/ にあります
→ ls -l /usr/local/bin/python*
-rwxr-xr-x 1 root 2 2006-11-09 05:05 /usr/local/bin/python2.5-config*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3-32*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3-config -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3-config*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3.3 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3.3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3-32*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3.3-config -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3-config*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3.3m -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3m*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/python3.3m-config -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3m-config*
-rwxr-xr-x 1 root 1 2012-03-02 13:43 /usr/local/bin/pythonbrew_install*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/pythonw3 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/pythonw3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3-32*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/pythonw3.3 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3.3*
lrwxr-xr-x 1 root 1 2013-02-25 12:50 /usr/local/bin/pythonw3.3-32 -> ../../../Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3.3-32*
まだそこにはいませんが、少なくとも 2 つの Python 2.7 のコピーがあります。