3

Possible Duplicate:
Can I install Python 2.7.1 64bit along side of an exsiting 32bit install on OS X?

I have a MacBook Pro running 10.7.3 Lion with Python 2.7 64bit installed by default. I need a program called VPython for a physics class I am in and VPython site says it doesnt work with 64 bit Python. So I was wondering if i had both 32 bit and 64bit Python 2.7 on my MacBook, if they would collide or cause problems. I know i could do Python 3.1 version of VPython, but I think most of the instructions the professor gives us is for Python 2.7. Thanks for any help regarding this.

Community
  • 1
  • 1
vt-cwalker
  • 795
  • 2
  • 16
  • 34
  • 1
    Ok that didnt help at all. And I dont try it, bc if it messes something up, I dont want to spend time getting it back to the way it was. Bc i just redid my computer 3 times in the past week. – vt-cwalker Feb 10 '12 at 00:22
  • Now that did help.. LOL I didnt find that in my search or when i typed the title of this post in. But that explained maybe how to work around it. Thanks for that – vt-cwalker Feb 10 '12 at 00:28
  • No problem. It was hit #6 for "installing 32-bit python and 64-bit python". – John Zwinck Feb 10 '12 at 00:28

1 Answers1

7

Without installing another python you can switch between the default 32/64 bits using env:

$ python -c 'import sys; print sys.maxint'
9223372036854775807
$ export VERSIONER_PYTHON_PREFER_32_BIT=yes
$ python -c 'import sys; print sys.maxint'
2147483648

See man python on OSX.

You can also execute the binary with arch -i386:

$ /usr/bin/python2.7 -c 'import sys; print sys.maxint'
9223372036854775807
$ arch -i386 /usr/bin/python2.7 -c 'import sys; print sys.maxint'
2147483648
tito
  • 12,990
  • 1
  • 55
  • 75