我正在尝试在64位模式下执行python.
从这篇文章:How to force using 64 bit python on Mac OS X?,我检查了python是否都具有32/64位二进制文??件.
<code>> lipo -info `which python` > Architectures in the fat file: /usr/bin/python are: x86_64 i386 </code>
但是,当我尝试同时在32位和64位模式下使用python时,总是得到32位实现,我使用了How do I force Python to be 32-bit on Snow Leopard and other 32-bit/64-bit questions中的提示
<code>> 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 </code>
可能是什么问题?我使用Mac OS X 10.10.2.
解决方法:
根据Jeff的评论,我从brew安装了python.
<code>> /usr/local/Cellar/python/2.7.9/bin/python -c 'import sys; print sys.maxint' 9223372036854775807 </code>
现在,它至少可以与brew的python一起使用.
【说明】:本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!