3

I've tried to install smtplib on my windows PC using pip and easy_install but running into below errors,can anyone point me how to install smtplib on windows?

C:\>pip install smtplib
Collecting smtplib
  Could not find a version that satisfies the requirement smtplib (from versions: )
No matching distribution found for smtplib

C:\CST_QSPR\third_party_bin\BuildLoaderScripts\Android\cnss_image_loader>easy_install smtplib
Searching for smtplib
Reading https://pypi.python.org/simple/smtplib/
Couldn't find index page for 'smtplib' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for smtplib
error: Could not find suitable distribution for Requirement.parse('smtplib')
Jeff Short
  • 285
  • 1
  • 5
  • 14

4 Answers4

7

I believe this is a built in module so you can just import it without worry.

Matt N
  • 867
  • 7
  • 6
1

I am using python3.9.6. When I tried using pip install smtplib, I got the same error as yours. After some little research I got the solution:

  • Using pip install secure-smtplib for installation.
  • Then import smtplib for importation
Fabio Mendes Soares
  • 1,357
  • 5
  • 20
  • 30
0

I believe using pip install secure-smtplib would give same result

0

Installing smtplib in Windows

  1. Install using smtplib command in command prompt:
    pip install smtplib

Received Error message stating


> WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/smtplib/
ERROR: Could not find a version that satisfies the requirement smtplib (from versions: none)
ERROR: No matching distribution found for smtplib
  1. If couldn't install using above command try installing using secure-smtplib command in command prompt:
pip install secure-smtplib

To know more about secure-smtp visit https://pypi.org/project/secure-smtplib/ Successfull installation gives below message

Collecting secure-smtplib
Downloading secure_smtplib-0.1.1-py2.py3-none-any.whl (3.4 kB)
Installing collected packages: secure-smtplib
Successfully installed secure-smtplib-0.1.1
  1. If unable to install smtplib using secure-smtplib check for version of python used. Installation of secure-smtplib needs wheel installation which works only for Python version 2.7 visit https://pypi.org/project/secure-smtplib/#files to get more idea.If not using Python 2.7 download 2.7 version and make sure python interpreter is set for python2.7 version
dataninsight
  • 1,069
  • 6
  • 13