2

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

alex_danielssen
  • 1,839
  • 1
  • 8
  • 19
  • Does this answer your question? [How to refresh the environment of a PowerShell session after a Chocolatey install without needing to open a new session](https://stackoverflow.com/questions/46758437/how-to-refresh-the-environment-of-a-powershell-session-after-a-chocolatey-instal) – Leon Sep 18 '21 at 14:16

0 Answers0