Use the brew python3 instead of Sonoma python3 in VSC

I am using Macos Sonoma
I have installed python with homebrew:

/bin/bash -c “$(curl -fsSL”

This installation results in 3.11

8:23 ~ >which python3
8:24 ~ >python3 --version
Python 3.11.6

After that I have installed the PlatformIO plugin in Visual Code
Everything works fine however I get warnings:

/Users/jaapnoordzij/.platformio/penv/lib/python3.9/site-packages/urllib3/ NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with ‘LibreSSL 2.8.3’.

It looks like Platform IO is still using the Mac Sonoma version of Python3 :
pio system info reports:

PlatformIO Core 6.1.11
Python 3.9.6-final.0
System Type darwin_x86_64
Platform macOS-14.1.1
File System Encoding utf-8
Locale Encoding UTF-8
PlatformIO Core Directory /Users/jaapnoordzij/.platformio
PlatformIO Core Executable /Users/jaapnoordzij/.platformio/penv/bin/platformio
Python Executable /Users/jaapnoordzij/.platformio/penv/bin/python
Global Libraries 0
Development Platforms 1
Tools & Toolchains 6

How can I change this to use the brew version of python3 ?