AirSim icon indicating copy to clipboard operation
AirSim copied to clipboard

'Powershell or pwsh not found, please install it' while running 'build.cmd'

Open AlezzzRd opened this issue 3 years ago • 8 comments

Question

What's your question?

I tried to build the AisSim files with 'build.cmd'. However, it shows 'Powershell or pwsh not found, please install it'. I have installed PowerShell on my computer but the problem still not solved. What should I do?

Include context on what you are trying to achieve

Context details

The version of Visual Studio 2019 Developer Command Prompt is v16.10.3. The version of AirSim is v1.5.0.

AlezzzRd avatar Jul 02 '21 16:07 AlezzzRd

Hi and welcome @AlezzzRd! Can you check which bitness of powershell you have installed and which visual studo 2019 developer command prompt you are running under? You can check the bitness of powershell by doing this

zimmy87 avatar Jul 07 '21 19:07 zimmy87

I also met that problem... `********************************************************************** ** Visual Studio 2019 Developer PowerShell v16.11.4 ** Copyright (c) 2021 Microsoft Corporation


PS C:\Users\RRiverson\source\repos> F: PS F:> cd .\AirSim
PS F:\AirSim> .\build.cmd Powershell or pwsh not found, please install it. PS F:\AirSim> `

What should I do ?

ACE199704 avatar Oct 10 '21 10:10 ACE199704

Hi @AlezzzRd and @ACE199704, are either of you still experiencing this issue? If so, can you post the output of running where powershell in a Developer Command Prompt?

zimmy87 avatar Jan 14 '22 11:01 zimmy87

Not sure if the issue has already been addressed yet. I had the same problem but solved it by modifying my Visual Studio. Specifically, I only selected "Desktop Development with C++" in the Workloads and chose the newest "Windows 10 SDK" in the Individual Components tab. Besides that, check your environment variable to see if the path to Powershell is there. Hope that helps!

Fengtao22 avatar May 15 '22 18:05 Fengtao22

I solved it by add some adding these to my path in environment variables Screenshot (1)

StepLogic avatar Jun 10 '22 08:06 StepLogic

Hi @AlezzzRd and @ACE199704, are either of you still experiencing this issue? If so, can you post the output of running where powershell in a Developer Command Prompt?

Hello, I have been trying to solve this problem for two days, and nothing helps, along with colleagues who know a better knowledge about Windows, Bash etc. Attempts to assign the exact path in the file "build.cmd" and all sorts of other resolutions. (I do not know exactly what kind, because I was just a follower of friends' instructions) In the end, there was no success. I have the same problem as guys above. To answer your question.
2022-10-07 11_57_44-Window

andrz45 avatar Oct 07 '22 09:10 andrz45

I solved it by add some adding these to my path in environment variables Screenshot (1)

So I found the "System32" powershell path, but not the one in "Program Files" and I'm still getting the error. Is the one in "Program Files" different? Or maybe it only needed the system32 one

crose72 avatar Mar 29 '23 02:03 crose72