Reputation: 717
Package installed but can't be imported : ModuleNotFoundError: No module named. There's a chance I do not use the module right, Idk (tried from module import *, import module and from module import module). The package I'd like to install is py3dns/ dnspython - I don't care which of them, just trying to make [validate_email('[email protected]',check_mx=True)] work, and in the validate_email's instruction they wrote "check_mx" need pyDNS. I understood pyDNS is not supported anymore in python 3.
Upvotes: 0
Views: 1073
Reputation: 95038
validate_email
does import DNS
which means it only works with PyDNS
, not dnspython
.
Upvotes: 1
Reputation: 39
install py3DNS and validate_email with:
sudo -H pip install py3dns validate_email
or on Windows just use admin cmd prompt:
pip install py3dns validate_email
then you can run your code normally
from validate_email import validate_email
is_valid = validate_email('[email protected]', verify=True)
Upvotes: 0