The Twilio python quickstart guide says to use a submodule called twilio.rest .
But after installing the twilio module today via sudo pip install twilio, which installed version 2.0.8, there appears to be no module (or object) called “rest” within the twilio module.
Where is twilio.rest?
There are two things you should check.
First, if you already have a package installed with
pip, runningpip install package-namewill NOT upgrade the package. To upgrade the package to the newest version, runSecond, we often see this error occur because people named the file containing their Twilio code
twilio.py. This means that trying toimport twilio.restwill fail because Python is looking in thetwilio.pyfile for the.restmodule. To resolve the problem use a different filename.If you have more problems with the
twiliomodule andImportErrormessages, there is a full set of documentation here: http://readthedocs.org/docs/twilio-python/en/latest/faq.html#importerror-messages