Call a python script in windows direct from venv similar to Unix

Have a python script that works fine on Windows (server 2019). Would like to run this script without having to load a virtual environment first as this would be in a non-interactive automated process.

Have seen a way of doing this on linux/uinx where the script is run directly from the bin\python folder in the .venv folder. Unfortunately windows does not seem to have such a folder structure so the only way to run on windows is to activate the virtual env prior to running the python script.

Is there a equivalent of the .venv\bin\python on windows so scripts can be run without loading the env first?

Instead of this
$ . ./<my_virtual_environment>/bin/activate
$ python <my_script>.py

Run directly from the venv but in Windows equivilent
$ ./<my_virtual_environment>/bin/python <my_script>.py

I think you’re looking for the Scripts directory?

E.g:

my_312_venv\Scripts\python.exe -V

That did run the script though several variables not resolving correctly, guess that down to the the script to load the env may be doing more that just loading the python env?

So run issue resolved the remainder is a scripting issue?

Take it the -V switch is verbose?

It sounds like a scripting issue. If you’re stuck on this then it could be good to share the code snippet and error message and someone might chime in with an answer.

Thanks for the hep Mark, will look art script and see whats going on, at lest able to run it without having to load the env.