Can I install Python 2.7.1 64bit along side of an exsiting 32bit install on OS X?
Question: **Short Description**  
Is it possible to install Python 2.7.1 64/32bit from
[python.org](http://www.python.org/download/#id11) on top of an existing
install (from python.org) of Python 2.7.1 32bit?

**Background**  
I installed the 32bit version for wxPython(2.8) support which until now has
given me zero issues. There are a few modules that I am now having difficultly
installing (psycopg2 and mysql-python). The warning messages in homebrew
constantly warn me about not having a 64bit version of Python on the path.
These warnings only add to my list of wanting to use a 64 bit version.

At the time I selected the 32bit install, the GUI for a particular project was
the main focus. Now the GUI has been come very simple and the database back-
end support (using Django) is much more important. This being said, using the
development version of wxPython 2.9 (which supports OS X and 64bit 2.7) has
become acceptable.

For the non-mac users, to help explain why I had to use the 32bit version
please see this [Brief guide to using virtualenv in a wxpython
project](http://batok.github.com/virtualenvwxp/)

**System Information**  
_Development System_  
_OS:_ Mac OS X Snow Leopard (10.6.7)  
_Python:_ 2.7.1 with virutalenv / virutalenv-wrapper  
_Project Dependencies:_  
Note that MySQL could be PostgresSQL's psycopg2 if I can get the postgresql to
install with homebrew

> Django==1.2.5  
>  MySQL-python==1.2.3  
>  PIL==1.1.7  
>  PyVISA==1.3  
>  pyserial==2.5  
>  virtualenv==1.5.1  
>  virtualenvwrapper==2.6.3  
>  wsgiref==0.1.2  
>  wxPython==2.8.11.0  
>  wxPython-common==2.8.11.0

_Deployment System_  
_OS:_ Windows XP / Windows 7  
_Python:_ Hopefully none (goal to use py2exe, or similar tool)

**Current Thoughts**  
I fear that my goal cannot be accomplished based on the file paths alone. In
Windows 7 the identifier (x86) is placed in the path showing that it is a
32bit program, but on OS X the path would be the same for 32bit or 64/32bit
installs (/Library/Frameworks/Python.framework/Versions/2.7/).

Any thoughts or comments would be helpful!

**Update 5-18-2011: 8:40 AM**  
I have confirmed that using the pre-compiled (.dmg) framework builds,
installing the a 64 bit version _does_ blow away the 32 bit install. This did
negatively effect my virtual environments in that all of the things I have
installed in the environments was based on the 32 bit install nearly every
module threw an error of some sort.

I still have not achieved installing 32 bit and 64 bit on the same machine,
however looking into [homebrew](https://github.com/mxcl/homebrew) with greater
detail does look this _could_ be possible. The trick would be to define your
own formulas for each of the python builds (from source) and rename the
install directory to something like 'Python27_32' and 'Python27_64'. I'll keep
exploring this front as I have time.

**EDIT 7-12-2011: 10:51 AM CST**  
Has anyone out there been able control how homebrew compile options?
Specifically how to select to use a 64bit compiler or a 32 bit compiler? I
will create a new SO question if this doesn't bring anything up.


Answer: Check out <http://www.macports.org/> Which provides ports of various flavors
of linux/unix tools that don't appear in the default MacInstallation and
duplicates those that it needs otherwise. It installs everthing in /opt/local
instead of stepping on the installed base. With some manipulation of PATH and
LD_LIBRARY_PATH this might give you the options you need.

