VMware Cloud Community
lazareth123
Contributor
Contributor
Jump to solution

PowerCLI not picking up latest version of Python

Hey guys, 

I'm trying to inject a software raid driver into my esxi image and I'm trying to use a PS script which uses PowerCLI modules to do this but I can't get it to accept that I have the latest Python version and I keep getting this error: 

An unexpected error occurred:
Failed to initialize the VMware.ImageBuilder PowerCLI module because of error: Unsupported Python version. VMware.ImageBuilder supports Python 3.7.1 and higher.
Make sure that Python 3.7.1 or higher is installed and that you have set the path to the Python executable by using Set-PowerCLIConfiguration -PythonPath <executable_path>. See the PowerCLI Compatibility Matrixes for information on the Python requirements.

I've looked up so much online but I can't see what's wrong here. It's pointed to the correct directory for Python and the PATH is set correctly upon Python install. 

Get-PowerCLIConfiguration | select *


DefaultVIServerMode : Multiple
ProxyPolicy : UseSystemProxy
ParticipateInCEIP : False
CEIPDataTransferProxyPolicy : UseSystemProxy
DisplayDeprecationWarnings : True
InvalidCertificateAction : Unset
WebOperationTimeoutSeconds : 300
VMConsoleWindowBrowser :
Scope : Session
PythonPath : C:\Python\Python312-32\python.exe

DefaultVIServerMode :
ProxyPolicy :
ParticipateInCEIP : False
CEIPDataTransferProxyPolicy :
DisplayDeprecationWarnings :
InvalidCertificateAction :
WebOperationTimeoutSeconds :
VMConsoleWindowBrowser :
Scope : User
PythonPath : C:\Python\Python312-32\python.exe

DefaultVIServerMode :
ProxyPolicy :
ParticipateInCEIP :
CEIPDataTransferProxyPolicy :
DisplayDeprecationWarnings :
InvalidCertificateAction :
WebOperationTimeoutSeconds :
VMConsoleWindowBrowser :
Scope : AllUsers
PythonPath : C:\Python\Python312-32\python.exe

 

lazareth123_0-1703443577460.png

 

0 Kudos
1 Solution

Accepted Solutions
lazareth123
Contributor
Contributor
Jump to solution

Well I followed that guide and went back to v13 and upgraded Python to 3.7.9 and what do ya know? it worked! 

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

Which PowerCLI version are you using?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

lazareth123
Contributor
Contributor
Jump to solution

thanks for the reply version 13. 

 

I've since got it to work by using Python 3.7.1 but I'm now getting this error while creating the iso: 

An unexpected error occurred:
[PEM: NO_START_LINE] no start line (_ssl.c:2471)

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That sounds like the issue described in Custom ISO fails at Export-ESXImageProfile with a ... - VMware Technology Network VMTN


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

lazareth123
Contributor
Contributor
Jump to solution

Yeah I saw that and uninstalled v13 down to v12 of PowerCLI but still the same problem 😞

It sounds like it's looking for a cert? Why would that be? I don't anything vmware setup so it's not like I have a cert for any vmware products. 

lazareth123_0-1703518581286.png

Also, merry xmas everyone and thanks for your help so far lucd!

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Did you also try the procedure described in PowerCLI 13 update and installation hurdles on Windows


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

lazareth123
Contributor
Contributor
Jump to solution

Well I followed that guide and went back to v13 and upgraded Python to 3.7.9 and what do ya know? it worked! 

0 Kudos