Forum Discussion

Klintj's avatar
Klintj
Copper Contributor
Feb 01, 2024

Using Powershell to Install Python

Hi all

 

A while ago I created a script in powershell to install python and it worked if I was running the script but then I automated it in Jenkins so it ran remotely on the machine. It installs Python Launcher but Control Panel does not show the actual Python inatall, yet regiatry believes it exists. 

 

Seems the install is corrupted.

 

Today I did a new script to run via GPO on reatart to install python direct on server and the same issue happens. 

 

Python does not package as an msi and thus I need powershell to install it and this needs to be done without human intervention but no matter what I try it always corrupts/fails to fully install (no errors) 

 

Does anybody have a solution guaranteed to install? It's doing my head in

 

Prior to install I also run some uninstall commands and registry clearing of old version if that is crucial info though that shouldn't cause issue

 

Thanks for your responses

2 Replies

  • Thomas Lee's avatar
    Thomas Lee
    Brass Contributor
    Why not use Chocolately - there is a very recent package you could install.,
    • Klintj's avatar
      Klintj
      Copper Contributor

      Thomas Lee thanks for your reply..

      Chocolatey is not an option as this is a task I'm trying to do to work towards automating installation in my job..and as it's a third party software, I'm not in a position to acquire it and thus install it. I have to avail myself of a non third party way or one that is trusted and free though correct procedure for me would need security to review software and that could take ages and then could mean they deny it.

Resources