There are two things you should check.
First, if you already have a package installed with pip , running pip install package-name will NOT update the package. To upgrade the package to the latest version, run
pip install
Secondly, we often see this error because people named the file containing their Twilio code twilio.py . This means that the attempt to import twilio.rest will fail because Python is looking in the twilio.py file for the .rest module. To solve the problem, use a different file name.
If you have more problems with the twilio module and ImportError , there is a full set of documentation here: http://readthedocs.org/docs/twilio-python/en/latest/faq.html#importerror-messages
source share