Installed additional python2.7 to Snow Leopard. What happens to modules I want to install? I recently asked if I should upgrade python 2.6 to python 2.71 on my Mac (Snow Leopard). I was told to install 2.7 without removing 2.6. Done!

Now I was wondering how the installation of new modules is handled:

Does both 2.6 and 2.7 access the same place where all new python modules are installed by pip, easy_install and setup.py? Is there something I have to take care of?

Another question occured to me: How do I tell a script that I have written to be run by python 2.7.2?
Install of python modules goes in x/Library/FrameworksPython.framework/Versions/2.6 etc where x depends on the install.

nothing for the one from Apple as port of OSX. python executable in /usr/bin

nothing for pythons from python.org. python executable in /usr/local/bin

/opt/local if installed via macports (as I do)

You have to look at easy_install etc to see the path to the python they use. e.g. /usr/bin/easy_install has /usr/bin/python so using this will install in /Library/FrameworksPython.framework/Versions/2.6.

You cannot choose to run under a minor version of  python e.g. 2.7.2 as only one major version at a time is set up normally e.g. 2.7.2 replaced 2.7.1
Each major version of python will have its own executable e.g. python2.7 s to have a script use that verstio make it begin with #!/usr/bin/env python2.7 pr the full path.