I'm trying to set up an automatic python build on windows using shared windows runners on gitlab. I am able to install python using chocolatey, but when I try to use python, I get the error:
python -m pip install numpy
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 tried using the refreshenv
command as recommended here, but it gives me the result
Refreshing environment variables from registry for cmd.exe.
This sugests that the powershell profile is not loaded. Ordinarily I would restart the powershell window to reload the profile but I cannot do that in the CI pipeline.
How can I use python in the current powershell window