aws-elastic-beanstalk-cli-setup icon indicating copy to clipboard operation
aws-elastic-beanstalk-cli-setup copied to clipboard

install-python.ps1 doesn't work properly in powershell 7.x.x

Open ddemo-miriade opened this issue 4 years ago • 0 comments

1. Please specify the following:

  • OS: Windows 10

  • Shell: PowerShell 7.1.3

  • [x] I have reviewed the troubleshooting tips described here and they do not solve my problem

2. Description Cmdlet Get-WmiObject used in function Get-PythonExecutable, is depracated in powershell 7.x and the install-python.ps1 script doesn't retrieve Python executable properly

Affected Cmdlet: Get-WmiObject -Namespace "root/cimv2" -Class Win32_Product -Filter "Name Like 'Python 3.7.3 Executables%'"

Error: Get-WmiObject: The term 'Get-WmiObject' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Suggested fix: Try to change the script using Get-CimInstance -Namespace "root/cimv2" -Class Win32_Product -Filter "Name Like 'Python 3.7.3 Executables%'"

ddemo-miriade avatar Apr 23 '21 12:04 ddemo-miriade