Jump to content

Recommended Posts

Posted

Hi all,

 

Has anyone managed to actually get Pygame working correctly on a school network? Students can't access CMD so they can't import the libraries that way.

 

We have PyScripter however, when I go to run it in 'remote mode' it just hangs when I enter the install command.

 

If you've managed to get it working, how?! :)

Posted

SCCM script -

 

"C:\Program Files\Python39\Scripts\pip.exe" install -U pygame"

 

Detection Rule - Check the following folder exists.

%ProgramFiles%\Python39\include\pygame

  • Thanks 1
Posted
if the paths are the same on every computer you conceivably install a virtual environment on one and copy it to all the other machines.
Posted

Thanks all - I think this started to work but it just gets stuck on 'Defaulting to user installation because normal site-packages is not writeable'.

 

Then comes up in yellow that the connection was broken and has timed out connecting to 'pypi.org'?

 

I've added that url to Smoothwall but nothing...

Posted
Students can't access CMD so they can't import the libraries that way.

 

Sorry, I have no experience of the particular issue you're trying to fix, I just thought I'd add that you could also look at using pip's (the Python package manager) "requirements.txt" file to configure installed Python packages, possibly at machine boot / user login time.

Posted (edited)
Thanks all - I think this started to work but it just gets stuck on 'Defaulting to user installation because normal site-packages is not writeable'.

 

Then comes up in yellow that the connection was broken and has timed out connecting to 'pypi.org'?

 

I've added that url to Smoothwall but nothing...

 

iirc you have to tell smoothwall not to inspect the domains as it breaks the certificate chain.

 

you can also use the command parameters --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypy.org to ignore the certificate errors.

Edited by browolf
Posted
iirc you have to tell smoothwall not to inspect the domains as it breaks the certificate chain.

 

you can also use the command parameters --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypy.org to ignore the certificate errors.

 

 

Do you put those commands in the pygame cmd script?

Posted
This is the error that comes up

 

[ATTACH=CONFIG]65668[/ATTACH]

 

 

you need to set the smoothwall to not ssl inspect the traffic to the domains pip is trying to hit.

Posted (edited)
Do you put those commands in the pygame cmd script?

 

they're for use with pip. aka this is through our smoothwall

 

Screenshot 2022-06-09 092616.png

 

 

we also have the domains in do not inspect in smoothwall.

Edited by browolf
Posted

I download the .whl files for each package they want and put them in a folder.

 

Then install for all users:

pip.exe install --no-index --find-links "Path_to_whl_folder" package_name

 

No proxies, SSL bypasses or command prompts needed.

  • Thanks 3
Posted
I download the .whl files for each package they want and put them in a folder.

 

Then install for all users:

pip.exe install --no-index --find-links "Path_to_whl_folder" package_name

 

No proxies, SSL bypasses or command prompts needed.

 

I do this as well, you sometimes have to install the dependency's as well but it just seems simpler to me than fighting the webfilter.

Posted
We only make python available as part of a sandboxed VM. The VM has no network connectivity, so we install PyGame as part of the initial VM build. They can't run python on the host machines as they can't be trusted to be sensible with it.
Posted (edited)
What were they doing that was not sensible?

 

Infinite loops spawning notepad, calc, etc. which then leads to host machines getting a hard reboot in order to become usable again. If that happens in a VM it doesn't bring the host down. That's the daft end of things, but then we also had kids bringing in and running whatever L334-HaXoR-looking python code they were finding on the web for things like chat apps, which we weren't keen on.

 

Edit: the whole "sandbox or no sandbox" debate has been had before RE: Python, more than once, so I'll just end with a ¯\_(ツ)_/¯ on that point.

Edited by jthompson
Posted
Doesn't sound too bad, I hear that students are allowed to chat with each other in a new technology called "playgrounds" these days
Posted (edited)

We've been asked to install Pygame on our systems, but honestly, I can't figure out how to do this. Other Pyhton based software we've deployed, Like Mu Editor and Thonny have had separate installers, which made it easier.

 

Our Python is installed in C:\Program Files\Python39. However, there is no Scripts folder located within here, so I can't use pip. We deploy software via SCCM and I can't figure out if it's possible to install Pygame this way.

 

Edit: I saw there is an MSI in another thread, though it says to get the MSI that matches the version of Python. The latest MSI I can see is for 3.2, despite we're running Python 3.9.

Edited by CHiLL

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...