执行Python在64位模式在Mac OS X 10.10 [英] Executing python in 64 bit mode on Mac OS X 10.10
本文介绍了执行Python在64位模式在Mac OS X 10.10的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在64位模式下执行蟒蛇。
I'm trying to execute python on 64 bit mode.
从这个帖子:如何强制使用Mac OS X 64位蟒蛇?,我检查了蟒蛇同时具有32/64位二进制。
From this post: How to force using 64 bit python on Mac OS X?, I checked that the python has both 32/64 bit binary.
> lipo -info `which python`
> Architectures in the fat file: /usr/bin/python are: x86_64 i386
然而,当我试图使用Python无论是在32位和64位模式下,我总是得到32位的实现,我用暗示的<一个href="http://stackoverflow.com/questions/2088569/how-do-i-force-python-to-be-32-bit-on-snow-leopard-and-other-32-bit-64-bit-quest">How做我强迫的Python是对雪豹等32位/ 64位的问题,32位
> 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。
What might be wrong? I use Mac OS X 10.10.2.
推荐答案
从杰夫的评论,我从 BREW
。
> /usr/local/Cellar/python/2.7.9/bin/python -c 'import sys; print sys.maxint'
9223372036854775807
现在,它工作正常,至少与酿造的蟒蛇。
Now, it works fine at least with brew's python.
这篇关于执行Python在64位模式在Mac OS X 10.10的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文