Compiling using cython and cl from Visual studio

I don't know markdown.  Sorry.

I've been told to use the following commands to compile python programs using cython and cl.
I want to use a virtual environment for this with it's own packages.  This seems to use the python environment installed Appdata.  

Here are the commands I'm using:

set "PYTHON_DIR=%LocalAppData%\Programs\Python\Python312"

cython -3 --embed -o convert_FAAOS_to_excel.c ..\..\src\python\

cl /O2 /I"%PYTHON_DIR%\Include" convert_FAAOS_to_excel.c /link /libpath:"%PYTHON_DIR%\libs"

How do I change that to a virtual environment?