syrusakbary / validate_email

Validate_email verify if an email address is valid and really exists
Other
573 stars 232 forks source link

Exception: For check the mx records or check if the email exists you must have installed pyDNS python package #23

Open nediazc opened 10 years ago

nediazc commented 10 years ago

Hi

I'm trying to use the validate email but its' raising the following error:

Exception: For check the mx records or check if the email exists you must have installed pyDNS python package

I have installed pydns several times and from different ways and nothing. I'm using OSX 10.9.3

Regards

Nelson

r14c commented 10 years ago

Try reinstalling PyDNS and take a look at the output. Then run python -c "import sys; print sys.path" and make sure PyDNS is being installed into one of the paths listed. If not, check your $PATH and make sure you're using the correct python interpreter.

saurabhchandrapatel commented 8 years ago

I have install py3dns but getting same error running on python 3

ArtiShrivastava commented 7 years ago

I am facing the same problem. I checked python -c "import sys; print sys.path" and PyDNS is installed into one of the listed path. But still its not working.

cryptoteatime commented 7 years ago

I ran into this error after trying a different method of validation in which i needed to downgrade my package.

I was able to fix it by doing the following:

pip install --upgrade --force-reinstall pyDNS

Hope this helps

EDIT: Try these if does not work Python 3+ pip3 install --upgrade --force-reinstall pyDNS pip3 install --upgrade --force-reinstall py3DNS

bussiere commented 4 years ago

Same error with py3 dns ...

Sakshi0112 commented 4 years ago

Exception Traceback (most recent call last)

in 1 from validate_email import validate_email ----> 2 is_valid = validate_email('example@example.com',check_mx=True) 3 print(is_valid) c:\users\lenovo\appdata\local\programs\python\python37\lib\site-packages\validate_email.py in validate_email(email, check_mx, verify, debug, smtp_timeout) 129 if check_mx: 130 if not DNS: --> 131 raise Exception('For check the mx records or check if the email exists you must ' 132 'have installed pyDNS python package') 133 hostname = email[email.find('@') + 1:] Exception: For check the mx records or check if the email exists you must have installed pyDNS python package even with pip3 install py3dns / pip install py3dns and pip install pydns please help out
Dipeshpal commented 3 years ago

Traceback-

pip3 install --upgrade --force-reinstall pyDNS Collecting pyDNS Using cached pydns-2.3.6.tar.gz (28 kB) ERROR: Command errored out with exit status 1: command: 'd:\projects\jarvisai-api\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\ pydns_2242bfa2a25a4d28bd0253c7dfc78f79\setup.py'"'"'; file='"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_2242bfa2a25a4d28bd0253c7dfc78f79\setup.py'"'"' ;f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C :\Users\dipes\AppData\Local\Temp\pip-pip-egg-info-3f6f7369' cwd: C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_2242bfa2a25a4d28bd0253c7dfc78f79\ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_2242bfa2a25a4d28bd0253c7dfc78f79\setup.py", line 12, in import DNS File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_2242bfa2a25a4d28bd0253c7dfc78f79\DNS__init__.py", line 14, in import Type,Opcode,Status,Class ModuleNotFoundError: No module named 'Type'

WARNING: Discarding https://files.pythonhosted.org/packages/4b/9e/be4f6bbe72c2a12bb83f8a91e027fe58507afe7325dcd08b914f2bf0f1f0/pydns-2.3.6.tar.gz#sha256=f1960d8bff0aafad9252b9e80279748 fe7ebe5e719487d132ccb1281523cdb62 (from https://pypi.org/simple/pydns/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached pydns-2.3.4.tar.gz (24 kB) ERROR: Command errored out with exit status 1: command: 'd:\projects\jarvisai-api\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\ pydns_d8ca04fbb5324a09a60e1b99f035a7d8\setup.py'"'"'; file='"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_d8ca04fbb5324a09a60e1b99f035a7d8\setup.py'"'"' ;f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C :\Users\dipes\AppData\Local\Temp\pip-pip-egg-info-ptuunm8e' cwd: C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_d8ca04fbb5324a09a60e1b99f035a7d8\ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_d8ca04fbb5324a09a60e1b99f035a7d8\setup.py", line 12, in import DNS File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_d8ca04fbb5324a09a60e1b99f035a7d8\DNS__init__.py", line 14, in import Type,Opcode,Status,Class ModuleNotFoundError: No module named 'Type'

WARNING: Discarding https://files.pythonhosted.org/packages/38/f8/0fa679229b29dff07429214f64c11bab6627488a4976aadf49776aefe974/pydns-2.3.4.tar.gz#sha256=2d6ced52ad1e893d0ed6eca76b4b1ec cdafbd76c54b41d2fa9cdaacd702853ea (from https://pypi.org/simple/pydns/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached pydns-2.3.3.tar.gz (24 kB) ERROR: Command errored out with exit status 1: command: 'd:\projects\jarvisai-api\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\ pydns_165b136169ca4049ba56d732fdf6d896\setup.py'"'"'; file='"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_165b136169ca4049ba56d732fdf6d896\setup.py'"'"' ;f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C :\Users\dipes\AppData\Local\Temp\pip-pip-egg-info-ph_v7xij' cwd: C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_165b136169ca4049ba56d732fdf6d896\ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_165b136169ca4049ba56d732fdf6d896\setup.py", line 12, in import DNS File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_165b136169ca4049ba56d732fdf6d896\DNS__init__.py", line 14, in import Type,Opcode,Status,Class ModuleNotFoundError: No module named 'Type'

WARNING: Discarding https://files.pythonhosted.org/packages/5b/3e/51dd1aa6a383df81360b8ec6f758e63ff7b75c4e3a520dfaf88727f9cbcb/pydns-2.3.3.tar.gz#sha256=6532f232928c858f2b9f1bf43bb56c6 3867d00417db72d00c380915570612d3a (from https://pypi.org/simple/pydns/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. Using cached pydns-2.3.2.tar.gz (23 kB) ERROR: Command errored out with exit status 1: command: 'd:\projects\jarvisai-api\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\ pydns_f5887e5611a149078be3c274deee43a6\setup.py'"'"'; file='"'"'C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_f5887e5611a149078be3c274deee43a6\setup.py'"'"' ;f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C :\Users\dipes\AppData\Local\Temp\pip-pip-egg-info-xa6xbe6x' cwd: C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_f5887e5611a149078be3c274deee43a6\ Complete output (7 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_f5887e5611a149078be3c274deee43a6\setup.py", line 12, in import DNS File "C:\Users\dipes\AppData\Local\Temp\pip-install-zoqtv90i\pydns_f5887e5611a149078be3c274deee43a6\DNS__init__.py", line 14, in import Type,Opcode,Status,Class ModuleNotFoundError: No module named 'Type'

WARNING: Discarding https://files.pythonhosted.org/packages/90/1e/99b6e6ca8da93e8eb48cfde7c9c8f174740f5c231790fa6185d014fbc5fd/pydns-2.3.2.tar.gz#sha256=377c85522d9dd41b6bf71f3ca764971 2800ec920a69613a1b0c7caf455b85d8f (from https://pypi.org/simple/pydns/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. ERROR: Could not find a version that satisfies the requirement pyDNS ERROR: No matching distribution found for pyDNS

Same Error

TayeburAH commented 3 years ago

import DNS DNS.defaults['server']=['8.8.8.8', '8.8.4.4'] Put this in your email verification file. This worked for me