Jump to content

Recommended Posts

Posted

Hi Everyone,

I'm hoping this is the right forum. I'm having an issue with install packages via pip.

This is the error I get:

Could not fetch URL https://pypi.python.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLError(1, '[sSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:833)'),)) - skipping

 

I've spoken to the technicians at my school, they said their was an issue with pypi.org's safety and they couldn't unblock the URL because of it. Is anyone aware of a way to safely install Python packages? Ideally I don't want to use an online IDE as our internet is currently very slow and temperamental.

 

Thank you

Posted
I've spoken to the technicians at my school, they said their was an issue with pypi.org's safety and they couldn't unblock the URL because of it.

 

You can get Pip to download packages on one machine and install them on another - a quick Google for "download python packages for offline use" gives a bunch of answers, top of which was this StackOverflow item:

 

https://stackoverflow.com/questions/11091623/how-to-install-packages-offline

 

However, rather than you doing the above yourself, the proper solution is probably going to be to go back to the IT staff at your school and figure out what the actual problem is with them. They probably have a good reason for blocking PyPi - it's a public code repository, it can get malware sneaked in, they might well figure it's best not to have just anyone be able to import any package. If that's the case, you should be able to request a known set of libraries to be set up on your Python environment (or possibly they could just whitelist the URLs for known libraries) - that might be the best option anyway, as you'd then have a nice, consistent set of libraries of the same version across all your machines.

 

Ideally I don't want to use an online IDE as our internet is currently very slow and temperamental.

 

Again, is this something you can ask the IT staff about - is your whole school's actual internet connection the issue, or is local network access (weak / overloaded WiFi, dodgy switch) the problem?

 

There's a couple of threads on this forum about setting up virtual machine environments for Python and other programming environments - it can be a good option, you put all the programming stuff in a self-contained, sandboxed VM where pupils can tinker around and easily restore to defaults if anything goes wrong. Also, you could set up a local server as a self-contained programming environment.

  • 3 months later...
Posted

This goes back to 2018 for me so my memory maybe a little hazy on the details.

 

I think it was to do with MITM type filtering and to get wheels installed I did the following:

 

python -m pip install --upgrade pip --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install numpy --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pandas --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pyglet --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pygame --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install wxpython --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pillow --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install opencv-python --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install matplotlib --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install dash --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org

 

And this was when our filtering had us going through a proxy:

 

python -m pip install --upgrade pip --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install numpy --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pandas --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pyglet --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pygame --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install wxpython --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install pillow --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install opencv-python --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install matplotlib --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.orgpip install dash --proxy [proxy_address:proxy_port] --trusted-host pypi.python.org --trusted-host pypi.org --trusted-host files.pythonhosted.org

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...