2

i'm a teacher in a high school and we're using python to code. I'm trying to install packages like pygame and mysql.connector but the firewall is blocking me from using pip...

I get the following error messages:

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))) - skipping

Any chance there is a way to do this around the firewall? I've already tried contacting our IT tech but they can't or won't help. We need this for our senior pupils and their computing projects.

Thanks!!

Kris
  • 21
  • 1
  • It's sad to see such strict firewall rules in place and that a place of education is actually impeding it's own student's success. :( I hope you find a resolution to your issue. I commend your efforts trying to teach your students PyGame <3 – Matt Clark Jan 24 '22 at 10:33
  • Can you try to add `config --global http.sslVerify false` and/or `--trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org` to the `pip install` command? – FlyingTeller Jan 24 '22 at 10:50
  • I’ll give this a shot @flyingteller – Kris Jan 25 '22 at 11:05
  • Similar to FlyingtTeller, I would say. Would [this](https://stackoverflow.com/questions/21468550/pip-not-working-behind-firewall) help. – JoraSN Jan 27 '22 at 23:41

1 Answers1

0

You're going to have a bad time if you can't even install pip packages on those PCs. My recommendation instead would be to create VM images with all the dependencies installed at home and just bring them to the school PCs.

This was the standard at my university's CS degree at least. We were provided with pre-configured environment for pretty much every lecture (operating systems, programming, computer networks etc.) - as a plus, that way the professors didn't have to waste time "troubleshooting" unique issues with environment.

Link for Oracle's Open-source VM

yeehawk
  • 46
  • 1
  • 4
  • Sadly we can’t run virtual machines either on school computers. I also teach cyber security at the school and it’s basically impossible to do the things the exam board want because of the school restrictions. Thanks for your help though! – Kris Jan 25 '22 at 11:04
  • Hm, and what about some kind of docker container to run that has development environment prepared? Would that fall under "no VM" rule as well? – yeehawk Jan 25 '22 at 13:43
  • I’ve not heard of that before so I’ll need to investigate. Then no VM is only because that’s not been turned on with the BIOS settings – Kris Jan 26 '22 at 14:37