I have a python script that downloads projects out of git. This script runs inside a virtual enviroment ( for example: d:\robot_fw\venv\cloner\Scripts\python.exe) After cloning the repo I itend to create a new virtual enviroment, with all depencies needed for the cloned project.
From the python script I used
subprocess.run([sys.executable, "-m", "venv", self.virtual_dir])
# sys.executable is d:\\robot_fw\\venv\\cloner\\Scripts\\python.exe
# self.virtual_dir is 'd:\\itxvenv\\venv\\myvenv'
The call was successfull. But when I check the directory I find: d:\itxvenv\venv\myvenv\Scripts and in this dir only python.exe and pythonw.exe The venv could not be activated
If I do the same call from inside a terminal ( terminal insode pycharm)
(cloner) PS D:\Development\Dev\cloner> d:\\robot_fw\\venv\\cloner\\Scripts\\python.exe -m venv d:\\itxvenv\\venv\\myvenv
I found
enter code here
ode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 21.02.2023 21:16 2066 activate
-a--- 21.02.2023 21:16 995 activate.bat
-a--- 21.02.2023 21:16 24167 Activate.ps1
-a--- 21.02.2023 21:16 393 deactivate.bat
-a--- 21.02.2023 21:16 107888 pip.exe
-a--- 21.02.2023 21:16 107888 pip3.10.exe
-a--- 21.02.2023 21:16 107888 pip3.exe
-a--- 21.02.2023 21:16 266616 python.exe
-a--- 21.02.2023 21:16 254840 pythonw.exe
This could be actiavted.
So whats going wrong here?