0

ImportError: No module named twilio.rest

Hi, for some reason I'm getting an ImportError: No module named twilio.rest. Despite the fact that I have installed twilio with brew and pip3.


Here is my code:

from twilio.rest import Client 
 
account_sid = '[ACCOUNT_SID]' 
auth_token = '[AuthToken]' 
client = Client(account_sid, auth_token) 
 
message = client.messages.create( 
                              from_='[twilio phone number]',  
                              body='Hiii!',      
                              to='[other phone number]' 
                          ) 
 
print(message.sid)

Thanks in advance for any help!

Sara Simon
  • 33
  • 1
  • 3
  • 11

0 Answers0