Document certificate installation for official Python installer (MacOS)
On Mac OS, having installed the latest official stable Python release, I was unable to install Poetry due to SSL errors caused by missing SSL certificates.
Running the official Poetry install command curl -sSL https://install.python-poetry.org | python3 -
resulted in:
# <snip>
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>
So I installed pip-system-certs
(pip3 install pip-system-certs
).
The install succeeded, but didn't resolve the issue.
To resolve the issue, I had to do this:
- Manually download
certifi
built package (.whl
) from here. - Run
pip3 install ~/Downloads/certifi-2024.2.2-py3-none-any.whl
(amend to your filename) - In Finder, visit
/Applications/Python 3.x
and double-clickInstall Certificates.command
- First run generates some SSL
WARNING
s, but the certificates install successfully at the end. - Now run it again, this time no
WARNING
s, and the certificates (re)install successfully.
- First run generates some SSL
Note that without the manual installation of certifi
as first step, the Install Certificates.command
won't succeed, since it attempts to install certifi
itself initially and cannot, because of missing certificates.
After completing these steps, poetry
installed successfully using the official one-liner mentioned above.