Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Will 32bit and 64bit Python collide? [duplicate]

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.

like image 948
vt-cwalker Avatar asked Apr 30 '26 14:04

vt-cwalker


1 Answers

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
like image 175
tito Avatar answered May 02 '26 03:05

tito



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!