What This Error Means
Your Python was built or installed without SSL support, so pip cannot make HTTPS requests to package indexes like PyPI.
How to Fix It
Reinstall Python from a trusted distribution that includes SSL support (system Python, python.org installers, or a well-supported env manager).
If compiling Python, install OpenSSL dev dependencies first, then rebuild Python so the ssl module is built.
After fixing Python, upgrade pip:python -m pip install --upgrade pip
Retry the original pip install command.
Why It Happens
Python was compiled without OpenSSL development libraries available, so _ssl/ssl wasn't built.
A custom Python distribution is missing SSL runtime dependencies.
The environment is misconfigured (wrong dynamic libraries, broken OpenSSL install).
How to Verify
Run python -c 'import ssl; print(ssl.OPENSSL_VERSION)' and confirm it succeeds.
Run python -m pip install <package> and confirm pip can reach HTTPS indexes.
Manual SSL availability checks
Test SSL import:python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
Confirm which Python is active:python -c 'import sys; print(sys.executable)'
If you built Python yourself, inspect how OpenSSL was linked/packaged.
Examples
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: ... (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping Why pip needs the Python ssl module
pip downloads packages over HTTPS from indexes (PyPI, mirrors, private registries).
HTTPS support in Python relies on the built-in ssl module, which depends on OpenSSL (or another TLS backend) being present at build/runtime.
If import ssl fails, pip cannot securely connect to package sources.
Prevention Tips
Avoid custom-building Python for production unless you manage its SSL dependencies carefully.
Standardize Python distributions across dev/CI.
Keep OpenSSL and Python updated to receive security fixes and modern TLS defaults.
Where This Can Be Triggered
github.com/pypa/pip/blob/25.3/src/pip/_internal/models/search_scope.py
pip warns about missing TLS support when it detects ssl/TLS is unavailable, but you have HTTPS index URLs configured. - GitHub
# If we don't have TLS enabled, then WARN if anyplace we're looking
# relies on TLS.
if not has_tls():
for link in itertools.chain(index_urls, built_find_links):
parsed = urllib.parse.urlparse(link)
if parsed.scheme == "https":
logger.warning(
"pip is configured with locations that require "
"TLS/SSL, however the ssl module in Python is not "
"available."
)
break