How to install python smtplib module in ubuntu os

How to install python smtplib module in ubuntu os

smptlib is part of pythons standard library, so you do not have to install it.

I will tell you a probable why you might be getting error like Error no module smtplib

I had created program as email.py

Now email is a module in python and because of that it start giving error for smtplib also

then I had to delete email.pyc file created and then rename email.py to mymail.py

After that no error of smtplib

Make sure your file name is not conflicting with the python module. Also see because of that any *.pyc file created inside the folder

How to install python smtplib module in ubuntu os

you can install smtplib using the command below it helped me to solve the error
install using pip

pip install secure-smtplib

Leave a Reply

Your email address will not be published.