SSL Verification Error during Installation Routine on macOS #72

Closed
opened 2021-07-04 20:36:11 +02:00 by alfonsrv · 0 comments
alfonsrv commented 2021-07-04 20:36:11 +02:00 (Migrated from github.com)

Just found out through this trending repo on HN that recipient validation via SMTP is possible – and that this beautiful library exists. 🤯

Library looks very promising, however I have issues installing it under macOS Big Sur – certificate validation fails when pulling the blacklist. Tried on both local internet and mobile hotspot – never saw a side-load during installation routine though, heh.
Installing works flawlessly on Ubuntu.

Probably similar to https://github.com/karolyi/py3-validate-email/issues/67

  • I have read and understood the FAQ
dummy@NullX ~ % pip3 install --no-cache-dir py3-validate-email
Defaulting to user installation because normal site-packages is not writeable
Collecting py3-validate-email
  Downloading py3-validate-email-1.0.0.tar.gz (16 kB)
Requirement already satisfied: dnspython~=2.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (2.1.0)
Requirement already satisfied: idna~=3.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (3.2)
Requirement already satisfied: filelock~=3.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (3.0.12)
Using legacy 'setup.py install' for py3-validate-email, since package 'wheel' is not installed.
Installing collected packages: py3-validate-email
    Running setup.py install for py3-validate-email ... error
    ERROR: Command errored out with exit status 1:
     command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"'; __file__='"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-record-p1y0pwh7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/dummy/Library/Python/3.8/include/python3.8/py3-validate-email
         cwd: /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/
    Complete output (18 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/validate_email
    copying validate_email/regex_check.py -> build/lib/validate_email
    copying validate_email/constants.py -> build/lib/validate_email
    copying validate_email/__init__.py -> build/lib/validate_email
    copying validate_email/updater.py -> build/lib/validate_email
    copying validate_email/email_address.py -> build/lib/validate_email
    copying validate_email/validate_email.py -> build/lib/validate_email
    copying validate_email/domainlist_check.py -> build/lib/validate_email
    copying validate_email/dns_check.py -> build/lib/validate_email
    copying validate_email/exceptions.py -> build/lib/validate_email
    copying validate_email/smtp_check.py -> build/lib/validate_email
    downloading blacklist to /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/build/lib/validate_email/data/blacklist.txt
    error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)>
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"'; __file__='"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-record-p1y0pwh7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/dummy/Library/Python/3.8/include/python3.8/py3-validate-email Check the logs for full command output.
dummy@NullX ~ % pip --version
pip 21.1.3 from /Users/dummy/Library/Python/3.8/lib/python/site-packages/pip (python 3.8)

PS: Anything that needs contributing?

edit: Did some digging and this might explain the issue.

Can be fixed running the following – and then obv. adding the exports to .bash_profile for the future:

pip3 install certifi
CERT_PATH=$(python -m certifi)
export SSL_CERT_FILE=${CERT_PATH}
export REQUESTS_CA_BUNDLE=${CERT_PATH}
Just found out through [this](https://github.com/reacherhq/check-if-email-exists/blob/a052c30e134ff74060fabacac5f63ecc1df831a4/core/src/smtp/mod.rs#L193-L328) trending repo on HN that recipient validation via SMTP is possible – and that this beautiful library exists. 🤯 Library looks very promising, however I have issues installing it under macOS Big Sur – certificate validation fails when pulling the blacklist. Tried on both local internet and mobile hotspot – never saw a side-load during installation routine though, heh. Installing works flawlessly on Ubuntu. Probably similar to https://github.com/karolyi/py3-validate-email/issues/67 - [x] I have read and understood the [FAQ](https://github.com/karolyi/py3-validate-email/blob/master/FAQ.md) ```bash dummy@NullX ~ % pip3 install --no-cache-dir py3-validate-email Defaulting to user installation because normal site-packages is not writeable Collecting py3-validate-email Downloading py3-validate-email-1.0.0.tar.gz (16 kB) Requirement already satisfied: dnspython~=2.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (2.1.0) Requirement already satisfied: idna~=3.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (3.2) Requirement already satisfied: filelock~=3.0 in ./Library/Python/3.8/lib/python/site-packages (from py3-validate-email) (3.0.12) Using legacy 'setup.py install' for py3-validate-email, since package 'wheel' is not installed. Installing collected packages: py3-validate-email Running setup.py install for py3-validate-email ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"'; __file__='"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-record-p1y0pwh7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/dummy/Library/Python/3.8/include/python3.8/py3-validate-email cwd: /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/ Complete output (18 lines): running install running build running build_py creating build creating build/lib creating build/lib/validate_email copying validate_email/regex_check.py -> build/lib/validate_email copying validate_email/constants.py -> build/lib/validate_email copying validate_email/__init__.py -> build/lib/validate_email copying validate_email/updater.py -> build/lib/validate_email copying validate_email/email_address.py -> build/lib/validate_email copying validate_email/validate_email.py -> build/lib/validate_email copying validate_email/domainlist_check.py -> build/lib/validate_email copying validate_email/dns_check.py -> build/lib/validate_email copying validate_email/exceptions.py -> build/lib/validate_email copying validate_email/smtp_check.py -> build/lib/validate_email downloading blacklist to /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/build/lib/validate_email/data/blacklist.txt error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1108)> ---------------------------------------- ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"'; __file__='"'"'/private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-install-xztvnky7/py3-validate-email_a4f845b720d74da1b50911c976109810/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/s2/0gfgc4qd58z4yxw64zbnft5c0000gn/T/pip-record-p1y0pwh7/install-record.txt --single-version-externally-managed --user --prefix= --compile --install-headers /Users/dummy/Library/Python/3.8/include/python3.8/py3-validate-email Check the logs for full command output. dummy@NullX ~ % pip --version pip 21.1.3 from /Users/dummy/Library/Python/3.8/lib/python/site-packages/pip (python 3.8) ``` PS: Anything that needs contributing? edit: Did some digging and [this](https://stackoverflow.com/a/42334357/4528066) might explain the issue. Can be fixed running the following – and then obv. adding the exports to `.bash_profile` for the future: ```bash pip3 install certifi CERT_PATH=$(python -m certifi) export SSL_CERT_FILE=${CERT_PATH} export REQUESTS_CA_BUNDLE=${CERT_PATH} ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: karolyi/py3-validate-email#72
No description provided.