這是我的代碼:導入錯誤:沒有模塊名爲sendgrid本地開發服務器Windows 10
import sendgrid
from sendgrid import SendGridClient, Mail
import Message
s = sendgrid.SendGridClient("2HXwPrNlQX-5RBJ61webMA")
message = sendgrid.Mail()
message.add_to('Jhon Doe <[email protected]>')
message.set_subject('Example')
message.set_html('Body')
message.set_text('Body')
message.set_from('Jhon Doe <[email protected]>')
status, msg = sg.send(message)
print(status, msg)
我安裝sendgrid
pip install -r requirements.txt
pip install sendgrid
pip install --upgrade sendgrid
pip install smtpapi
pip install --upgrade smtpapi
pip install python_http_client
pip install --upgrade python_http_client
當我運行的應用程序 dev_appserver.py ./ --port = 8081
錯誤:導入錯誤:沒有名爲模塊sendgrid