I am required to make use of my local environment and also use a virtual environment for a specific tool but this tool have dependency issues with my local environment. (I am already aware of how to use a virtualEnv within a script, here I am trying to create a new Virtual Environment within the script.) I want to create a python virtual Environment within a python program while in runtime(Because I have to delete this env at the end of the program). Need this environment to pass to python subprocess as keyword argument env.
I know I can create a virtualEnv using commands as argument to python subprocess. I am looking for some other approach