The reason for this is that
smtplib is inbuilt to Python. Therefore, it is installed initially with the Python installation.
You do not have to install it. You can import it and use it without really trying to install it. If it is essential to install the module, then use the below command:
If there is an error, make sure no file names conflict with the module. Example:
View all errors