1

I'm trying to execute python on 64 bit mode.

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 

However, when I tried to use python both in 32 and 64 bit mode, I get always 32bit implementation, I used the hints in 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

What might be wrong? I use Mac OS X 10.10.2.

Community
  • 1
  • 1
prosseek
  • 182,215
  • 215
  • 566
  • 871
  • 2
    One alternative is to use the python version brought by homebrew * It is more up to date * It works in 64 bits – Jeff Mar 21 '15 at 19:10

1 Answers1

0

From Jeff's comment, I installed python from 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.

prosseek
  • 182,215
  • 215
  • 566
  • 871