How to install python smtplib module in ubuntu os

I tried to install the python module via pip but it was unsuccessful. can anyone help me install python smtplib module in ubuntu 12.10 OS?

+7


source to share


4 answers


smptlib

is part of the python standard library , so you don't need to install it.



+13


source


I will tell you why you might be wrong, like Error no module smtplib

I created the program as email.py

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



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

After that no smtplib error

Make sure your filename is consistent with the python module. Also see Because of this, any * .pyc file created inside the folder

+6


source


Use this command to install smtp lib:

sudo pip3 install secure-smtplib

      

0


source


For a Linux based distribution, it's easy to install from source. Just download the source code from here , unzip it and open it in a terminal. Now, sudo python3 setup.py install

installation should be accomplished in a matter of seconds

-1


source







All Articles