[Python] " There was a problem confirming the ssl certificate..." while installing opencv...

Discussão em 'Python' iniciado por Stack, Março 15, 2025.

  1. Stack

    Stack Membro Participativo

    Hi this is a continuation of my first question.I am a beginner in python trying to create a face recognition project with the face recognition and opencv library on Mac M1. I created a new Conda envrionment with the correct configuration for arm64 using:

    CONDA_SUBDIR=osx-arm64 conda create -n openCVTest python=3.9 -c conda-forge --override-channel


    I activated the environment and did:

    conda install -c conda-forge opencv
    conda install -c conda-forge face_recognition


    I can see face_recognition in pip list, but my code still has an error when I import it. For opencv I didn't see the library installed when I did pip list so I tried to do:

    pip install opencv


    but it gave me this error:

    WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv/
    Could not fetch URL https://pypi.org/simple/opencv/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping


    I don't know if something is wrong with my pip or is it the environment that I set up is not functioning properly, I would really appreciate any help on how to resolve this issue.Thanks in advance.

    Continue reading...

Compartilhe esta Página