-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When using the --url option (initially only on the
development-http-dossier branch), macos shows the following diagnostic
on the console.
.../Library/Python/3.9/lib/python/site-packages/urllib3/init.py:35: NotOpenSSLWarning: urllib3 v2 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: urllib3/urllib3#3020
If the --url option is not used, the diagnostic is not shown.
There are four suggested ways to address the situation:
Solution 1: Use Python from Homebrew (Recommended)
bash
Install Python via Homebrew (comes with proper OpenSSL)
brew install python@3.11 # or python@3.12
Use the Homebrew Python
/opt/homebrew/bin/python3 -m pip install --upgrade urllib3 requests PyQt6
Run your app with Homebrew Python
/opt/homebrew/bin/python3 vrt.py
Solution 2: Suppress the Warning (Quick Fix)
If you can't change Python installations, you can suppress the warning
by adding this at the top of fetchurl.py:
python
import warnings
import urllib3
Suppress LibreSSL warning
warnings.filterwarnings('ignore', message='.urllib3.',
category=urllib3.exceptions.NotOpenSSLWarning)
Solution 3: Use Python from python.org
Download and install Python from
https://www.python.org/downloads/macos/ - these builds include proper
OpenSSL support.
Solution 4: Downgrade urllib3
As a last resort, you can use an older urllib3 that doesn't have this check:
bash
pip install 'urllib3<2.0'