Installed new version of python, Now I can't use the libraries I've installed for the older version in Mac
Question: I am using an older version of **Python 2.7.3** , but I realize that it is a
32 bit version and I needed a **64 bit** version to be able to use `MySQLdb`.

Also, I have other libraries that I have downloaded for Python 2.7.3. Now my
problem is, none of those libraries can be imported to my newly installed
version of **Python 2.7.5**. Just wondering if there is a way for both
versions to share libraries.

When I tried installing again `MySQLdb`, it wouldn't let me because it's
already installed, but under Python 2.7.3. Any solution?


Answer: > Just wondering if there is a way were both version can share libraries.

While it is possible share pure-Python modules between two different
installations of Python, at least if they have the same minor version, you
generally cannot share C extension modules like `MySQLdb`. And you
_definitely_ cannot use a 32-bit build of a module with a 64-bit Python.

* * *

> And When I tried installing again MySQLdb, it won't let me because it's
> already installed, but under 2.7.3.

There are two possible problems here.

First, you may just be using the wrong Python to do the installation. If you
use the 32-bit Python 2.7.3 to run `python setup.py install`, or the
`easy_install` or `pip` from that copy of Python, it will install into your
2.7.3 site-packages. This one is easy to fix—just use the 64-bit Python 2.7.5,
or its `easy_install` or `pip`.

More seriously, you may have both installations pointing at the same site-
packages directory and interfering with each other. This one is pretty much
impossible to fix; you're not going to make it work.

* * *

More generally, it's difficult to have two Python installations with the same
X.Y minor version on the same machine, and you really shouldn't try to do it
unless you have a very good reason to do so. A much better idea is to
completely uninstall both Pythons, including their site-packages, then do a
clean install of 2.7.5, then reinstall all of your libraries.

(Also, note that if you're using OS X 10.7 or higher, you already have a
64-bit Python 2.7.2 pre-installed by Apple, and you can't get rid of it, and
it can also cause similar problems for you.)

