我正在尝试在64位模式下执行python。
从这篇帖子:How to force using 64 bit python on Mac OS X?,我检查了python是否都有32/64位二进制文件。
> lipo -info `which python`
> Architectures in the fat file: /usr/bin/python are: x86_64 i386
但是,当我尝试在32位和64位模式下使用python时,我总是得到32位实现,我使用How do I force Python to be 32-bit on Snow Leopard and other 32-bit/64-bit questions中的提示
> defaults write com.apple.versioner.python Prefer-32-Bit -bool no
> python -c 'import sys; print sys.maxint'
> arch -i386 python -c 'import sys; print sys.maxint'
> defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
> python -c 'import sys; print sys.maxint'
> arch -x86_64 python -c 'import sys; print sys.maxint'
2147483647
2147483647
2147483647
2147483647
可能有什么问题?我使用的是Mac OS X 10.10.2。
答案 0 :(得分:0)
根据Jeff的评论,我从brew
安装了python。
> /usr/local/Cellar/python/2.7.9/bin/python -c 'import sys; print sys.maxint'
9223372036854775807
现在,它至少可以使用brew的python。