I have a powershell script which is meant to create a virtual environment with the following command:
py -3.6 -m venv --clear env
I have verified that I can do this when I run the above command in a powershell window, and the environment is created. However when I run the powershell script via an azure release pipeline, I get the following error:
python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I have verified that my user PATH environment variable has all the necessary paths:
C:\Python36\Scripts\;C:\Python36\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Python36\Lib\site-packages\pywin32_system32;C:\Python36\Lib\site-packages\win32;C:\Automation\app\env\Scripts;C:\Python38;C:\Python38\Scripts;C:\Python38\Lib\site-packages\win32;C:\Python38\Lib\site-packages\pywin32_system32
Specs:
Python: 3.6.7 OS: Windows 10 Environment: Azure virtual machine.
Any help would be much appreciated.