Hi.
I'm currently trying to find a way to mass deploy a fix for getting pip to work on some of the computers here via a Group Policy Object. Our systems are currently using Windows 10.
There is already a software install for Python 3.9.5 on our Group Policy system, however it doesn't seem to be installing pip and it hasn't updated the PATH either.
The current fix I've found works, but it is long-winded and will take ages to complete as it's running the following steps one computer at a time: 1) Make sure Python 3.9.5 and Pygame for 3.9 Groups have been assigned to the computer you want it on via Active Directory.
Then restart those computers and check that Python and Pygame is installing upon turning on again. If it isn't installing,
then login to admin account and run "gpupdate /force" and restart those computers again.
Once Python 3.9.5 has appeared in the Start Menu of that computer, you will know it has installed.
2) Login to an admin account and run CMD as an admin. Type in "pip3 --version". If it returns a location where it is, then
it is working properly and you can skip to Step 5. If it says it is not a recognisable command, then you will need to
proceed into doing the following.
3) Open up Control Panel and search for "path" in the search box. Click on "Edit environment variables for your account".
You should see a variable called "Path" under the User Variables. Click it and then click "Edit". If you don't see
two lines with python in the path name, then you will need to add them. Click "New" and type in the following:
C:\Program Files\Python39\
Press Enter to confirm it, now press "New" again, this time typing in:
C:\Program Files\Python39\Scripts
Press Enter to confirm it, now press "OK" twice to save changes.
Restart your CMD window as Admin and try running the "pip3 --version" command again. If it works, skip to step 5.
Otherwise continue with Step 4.
4) In the elevated CMD window, type in the following command: "py -m ensurepip --upgrade". This should install pip.
Now restart your CMD window again as Admin and test the "pip3 --version" command, it should work now.
5) You are now ready to install any python packages via the 'pip3' command. Use these to install pygame and guizero:
pip3 install pygame
pip3 install guizero
I'm hoping there's a reliable way I can apply the above steps into some kind of start-up script and create it as a GPO to apply alongside the Python install GPO so it can successfully install on all machines in one go.
If someone can point me in the right direction or provide a set of instructions to follow, that would be much appreciated.