I think the problem is that wrong python executable is chosen. Normally sys.path for modules is set appropriately if you install modules in normal ways (pip, setup.py, etc.).
The problem is that you have manually installed python 2.7.2 in /usr/local/bin which comes before /usr/bin in $PATH normally. This is why your default python in the terminal is 2.7.2. To explicitly tell Emacs that you want to use python in a specific path (i.e., /usr/local/bin/python), you need some Emacs configuration for python-mode.
There are some python modes for Emacs but I am guessing you are using "old" python.el, as you are using Emacs 23. To set python executable, I think adding this in your Emacs configuration does the job (But I never use this python-mode so I am not sure if it works.):
(setq python-python-command "/usr/bin/python")
You will need to re-open the python file after evaluating this code. Or simply just reboot Emacs.
If you use the new python.el, you have to add /usr/bin/ to python-shell-exec-path. If you are using python-mode.el, I guess it's (setq py-shell-local-path "/usr/bin/python" py-use-local-default t).