python – ImportError: No module named

python – ImportError: No module named

Twilio developer evangelist here.

I think your problem will be that somehow when you installed the library, it failed silently(?). A few things to keep in mind:

  1. When installing Python libraries, always make sure you use pip.
  2. Also, check that none of your files within the project are actually called as this will conflict with the actual library.
  3. Check that youre using the version of Python you think youre using by running python --version

All that failing, run the installation again, and all going well (without errors), you should be able to test it quickly with the following code.

import twilio

    client =, auth_token)

    message = client.messages.create(
        body=Hello World,
except twilio.TwilioRestException as e:
    print e

try this: sudo pip3 install twilio –upgrade

python – ImportError: No module named

I had this problem as well.

In my case, I had named my file and that is what caused the error.

Renaming the file to ( or any other name of your choice) will resolve the issue!

Leave a Reply

Your email address will not be published. Required fields are marked *