El módulo de solicitud de importación en Python no funciona en OS X

Tengo el módulo de solicitudes instalado en mi sistema.

pip install requests 

Ahora estoy intentando importar peticiones en el rpel

 import requests 

Falla con el siguiente error.

 Traceback (most recent call last): File "", line 1, in  ImportError: No module named requests 

Encontré una respuesta para este problema aquí , pero no dice nada acerca de tener python 2.x en el mismo directorio.

Mis salidas terminales son:

 MacBook-Pro:~ tanmaybaranwal$ which python /usr/bin/python MacBook-Pro:~ tanmaybaranwal$ which python2.6 /usr/bin/python2.6 MacBook-Pro:~ tanmaybaranwal$ which pip /usr/local/bin/pip MacBook-Pro:~ tanmaybaranwal$ sudo pip install python-firebase Password: Requirement already satisfied (use --upgrade to upgrade): python-firebase in /Library/Python/2.7/site-packages Requirement already satisfied (use --upgrade to upgrade): requests>=1.1.0 in ./Library/Python/2.7/lib/python/site-packages (from python-firebase) Cleaning up... MacBook-Pro:~ tanmaybaranwal$ sudo pip install requests Requirement already satisfied (use --upgrade to upgrade): requests in ./Library/Python/2.7/lib/python/site-packages Cleaning up... MacBook-Pro:~ tanmaybaranwal$ python Python 2.7.10 (default, Oct 23 2015, 18:05:06) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import firebase Traceback (most recent call last): File "", line 1, in  File "/Library/Python/2.7/site-packages/firebase/__init__.py", line 4, in  from firebase import * File "/Library/Python/2.7/site-packages/firebase/firebase.py", line 10, in  from .decorators import http_connection File "/Library/Python/2.7/site-packages/firebase/decorators.py", line 1, in  import requests ImportError: No module named requests 

Listado de módulos PIP tampoco tiene ningún módulo de requests .

Para asegurarte de que estás usando el python correcto para instalar algo con pip, puedes ejecutarlo a través de -m

 $ python -m pip install --user requests 

(Si omite la --user , es posible que necesite privilegios de root)