Downloading files to make a livekit agent - Pytorch and SSL

Trying to set up my first livekit agent but having a few issues. I am following this guide Voice Agent Foundations | Building Production-Ready Voice Agents with LiveKit and trying to run the starter agent but getting stuck when running:

uv run agent.py download-files

This is the problem I am getting:

PS C:\Users\ArchieEnstone\OneDrive - Prior Park Schools\Desktop\Livekit01\livekit-voice-agent> uv run -m livekit.agents download-files
livekit_ffi::server:153:livekit_ffi::server - initializing ffi server v0.12.56
livekit_ffi::cabi:50:livekit_ffi::cabi - initializing ffi server v0.12.56
discovered 3 plugin package(s): livekit.plugins.noise_cancellation, livekit.plugins.silero, livekit.plugins.turn_detector
downloading files for livekit.plugins.silero
finished downloading files for livekit.plugins.silero
downloading files for livekit.plugins.turn_detector
[transformers] PyTorch was not found. Models won’t be available and only tokenizers, configuration and file/data utilities can be used.
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
Retrying in 1s [Retry 1/5].
Retrying in 1s [Retry 1/5].
failed downloading files for livekit.plugins.turn_detector: Cannot send a request, as the client has been closed.
downloading files for livekit.plugins.turn_detector
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
Retrying in 1s [Retry 1/5].
Retrying in 1s [Retry 1/5].
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1016)’ thrown while requesting HEAD
Retrying in 1s [Retry 1/5].
Retrying in 1s [Retry 1/5].
failed downloading files for livekit.plugins.turn_detector: Can’t load the configuration of ‘livekit/turn-detector’. If you were trying to load it from ’ Models – Hugging Face ', make sure you don’t have a local directory with the same name. Otherwise, make sure ‘livekit/turn-detector’ is the correct path to a directory containing a config.json file

I have tried doing (which is now install that this hasn’t helped:

pip install certfi

and also ensured that Pytorch (package called torch) is install which it is.

Would appreciate any solutions or ideas.

Thanks

Interesting I used to see that a lot on MacOS but I don’t recall seeing it on Windows. We have an old guide for fixting this but will take me a moment to find it.

Just looked at our old guide on this, and it is very MacOS/Linux specific. I will put the important bits below in case you know how to translate to Windows OS (which I am no longer familiar with).

It is safe to ignore ensured that Pytorch (package called torch) since it is not needed for inference.

Based on those paths, that machine may be school-managed. If so, my first suspicion would actually be SSL inspection by the school’s security stack rather than a missing certifi package. The combination of OneDrive-managed school profile + SSL issuer errors only in Python is something I’ve seen quite a few times.

#This has fixed it for other Mac OS 15 users
pip install --upgrade certifi

# and whatever package manager you are using:
[apt|yum|brew]: reinstall ca-certificates

I asked an LLM to convert my Mac/Linux instructions to Windows. I hope this is helpful, as it has always worked previously on other OS. I don’t really have a way to test this for Windows.

This usually means Python cannot validate the certificate chain when downloading models from Hugging Face.

  1. Upgrade certifi

uv pip install --upgrade certifi

or

pip install --upgrade certifi

Verify that Python can find the CA bundle:

python -c "import certifi; print(certifi.where())"

  1. Verify the certificate store is working

Open PowerShell and run:

python -c "import ssl; print(ssl.get_default_verify_paths())"

If the paths look incorrect or empty, your Python installation may be damaged.

  1. Update Windows root certificates

Run PowerShell or Command Prompt as Administrator:

certutil -syncWithWU

If that doesn’t work:

certutil -generateSSTFromWU roots.sst
certutil -addstore -f Root roots.sst

Then restart PowerShell and try again.

  1. Corporate networks and SSL inspection

If you’re on a school, corporate, or managed network, HTTPS traffic may be intercepted by a proxy that replaces certificates with an internal CA.

This is especially common if:

  • The computer is managed by your employer or school.
  • You are connected through a VPN.
  • You are behind a security appliance such as Zscaler, Palo Alto, Fortinet, Cisco Umbrella, etc.

In these cases Python may not trust the organization’s root certificate even though browsers work normally.

Try:

curl https://huggingface.co

If the certificate shown is not issued by a public CA, contact your IT department for the organization’s root certificate.

  1. Verify Hugging Face access

Test whether Python can reach Hugging Face:

python -c "import requests; print(requests.get('https://huggingface.co').status_code)"

If this fails with the same SSL error, the issue is unrelated to LiveKit and must be fixed at the Python/Windows certificate level.