<p>The default Python install on OS X 10.5 is 2.5.1 with a FAT 32 bit (Intel and PPC) client. I want to setup apache and mysql to run django. In the past, I have run Apache and MySQL to match this install in 32 bit mode (even stripping out the 64 bit stuff from Apache to make it work).</p>

<p>I want to upgrade Python to 64 bit. I am completely comfortable with compiling it from source with one caveat. How do I match the way that the default install is laid out? Especially, with regards to site-packages being in <code>/Library/Python/2.5/</code> and not the one in buried at the top of the framework once I compile it. </p>

[{'answer_id': 30591, 'author': 'Clokey', 'author_id': 2438, 'author_profile': 'https://Stackoverflow.com/users/2438', 'pm_score': 1, 'selected': False, 'text': "<p>Not sure I entirely understand your question, but can't you simply build and install a 64 bit version and then create symbolic links so that /Library/Python/2.5 and below point to your freshly built version of python?</p>\n"}, {'answer_id': 31331, 'author': 'Doug Miller', 'author_id': 3431280, 'author_profile': 'https://Stackoverflow.com/users/3431280', 'pm_score': 0, 'selected': False, 'text': "<p>Essentially, yes. I was not sure you could do it like that (current version does not do it like that). When using the python install script, however, there is no option (that I can find) to specify where to put directories and files (eg --prefix). I was hoping to match the current layout of python related files so as to avoid 'polluting' my machine with redundant files.</p>\n"}, {'answer_id': 31384, 'author': 'Jason Baker', 'author_id': 2147, 'author_profile': 'https://Stackoverflow.com/users/2147', 'pm_score': 2, 'selected': True, 'text': "<p>Personally, I wouldn't worry about it until you see a problem.  Messing with the default python install on a *Nix system can cause more trouble than it's worth.  I can say from personal experience that you never truly understand what python has done for the nix world until you have a problem with it.</p>\n\n<p>You can also add a second python installation, but that also causes more problems than it's worth IMO.</p>\n\n<p>So I suppose the best question to start out with would be why exactly do you want to use the 64 bit version of python?</p>\n"}, {'answer_id': 31425, 'author': 'Doug Miller', 'author_id': 3431280, 'author_profile': 'https://Stackoverflow.com/users/3431280', 'pm_score': 0, 'selected': False, 'text': '<p>The short answer is because I can. The long answer, expanding on what the OP said, is to be more compatible with apache and mysql/postgresql. They are all 64bit (apache is a fat binary with ppc, ppc64 x86 and x86 and x86_64, the others just straight 64bit). <strong>Mysqldb and mod_python wont compile unless they are all running the  same architecture.</strong> Yes I could run them all in 32bit (and have in the past) but this is much more work then compiling one program.</p>\n\n<p>EDIT: You pretty much convinced though to just let the installer do its thing and update the PATH to reflect this.</p>\n'}, {'answer_id': 31765, 'author': 'John Douthat', 'author_id': 2774, 'author_profile': 'https://Stackoverflow.com/users/2774', 'pm_score': 1, 'selected': False, 'text': '<p>Hyposaurus,</p>\n\n<p>It is possible to have multiple versions of Python installed simultaneously. Installing two versions in parallel solves your problem and helps avoid the problems laid out by Jason Baker above. </p>\n\n<p>The easiest way, and the way I recommend, is to use <a href="http://www.macports.org/" rel="nofollow noreferrer">MacPorts</a>, which will install all its software separately. By default, for example, everything is installed in /opt/local</p>\n\n<p>Another method is to simply download the source and compile with a specified prefix. Note that this method doesn\'t modify your PATH environment variable, so you\'ll need to do that yourself if you want to avoid typing the fully qualified path to the python executable each time</p>\n\n<pre><code>./configure --prefix=/usr/local/python64\nmake\nsudo make install\n</code></pre>\n\n<p>Then you can simply point your Apache install at the new version using mod_python\'s <a href="http://www.modpython.org/live/current/doc-html/dir-other-pi.html" rel="nofollow noreferrer">PythonInterpreter</a> directive</p>\n'}]
['https://Stackoverflow.com/questions/29856', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3431280/']