我的问题是,当我运行从bash通过macport或Miniconda获得的python版本时,在python shell中无法识别空格键。当我按空格键时,我只听到哔声。
使用不同的shell似乎无法解决问题。
当我从源代码编译Python或者使用已安装在系统中的python时,这不会发生。我正在运行OSX 10.9.5。我编译了不同的python版本,它们工作正常,所以它似乎与我正在使用的python版本无关。
它只发生在python / ipython中我从未在其他应用程序或我的bash中看到过这个问题。
似乎与Macport(和Miniconda)python如何编译相关的东西(可能是一些libreadline问题?)。我也尝试了Miniconda版本,这显示了同样的问题。
一些可能的信息是:
Tha miniconda版本有问题
otool -L ~/miniconda/bin/python2.7
/Users/alessandromanzotti/miniconda/bin/python2.7:
@loader_path/../lib/libpython2.7.dylib (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 476.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
以及macport python
otool -L /opt/local/bin/python
/opt/local/bin/python:
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
otool -L /opt/local/bin/python3.3
/opt/local/bin/python3.3:
/opt/local/Library/Frameworks/Python.framework/Versions/3.3/Python (compatibility version 3.3.0, current version 3.3.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
与系统一起安装的osx python
otool -L /usr/bin/python
/usr/bin/python:
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.14.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
以及我编译的2版本
otool -L /Users/alessandromanzotti/Python2.7.8/bin/python2.7
/Users/alessandromanzotti/Python2.7.8/bin/python2.7:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 855.17.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 2577.0.0)