Skip to content
This repository was archived by the owner on Sep 30, 2019. It is now read-only.

ez_setup.py has deprecated methods for installing setuptools #96

Closed
mcprat opened this issue Mar 29, 2019 · 0 comments · Fixed by #97
Closed

ez_setup.py has deprecated methods for installing setuptools #96

mcprat opened this issue Mar 29, 2019 · 0 comments · Fixed by #97

Comments

@mcprat
Copy link
Contributor

mcprat commented Mar 29, 2019

The first problem I got in this library was just how to install it. I had a fresh install of Python 2.7.15 on Windows 10 64-bit. It took me a while to realize that pip was not yet bootstrapped (never heard of that before this).

Furthermore, the version that the script points to download is no longer hosted anywhere. It gave me an error that made it seem like TLS version in the certificate exchange of the download was to blame...when actually the URL it was attempting to access

The error led me to this:
https://stackoverflow.com/questions/46981300/python-error-when-installing-ez-setup-py-could-not-create-ssl-tls-secure-channe/47041448

but what was actually going on is the source that the script is attempting to download setuptools, is no longer hosting the version of setuptools that the script is looking for...

I imagine there are many ways to fix this in ez_setup.py

the solution for me was to execute in command prompt:
python -m ensurepip --upgrade
and then run the setup.py script instead

mcprat pushed a commit to mcprat/Adafruit_Python_GPIO that referenced this issue Mar 29, 2019
My suggestion for fixing the deprecated method for installing or updating setuptools using ez_setup.py
Also ensures that both pip and setuptools are 'bootstrapped' to the python environment, which does not always happen on a fresh install in Windows.

Fixes adafruit#96 

This can be made more robust by detecting if pip or setuptools is installed with `pip --version`, etc...
mcprat pushed a commit to mcprat/Adafruit_Python_GPIO that referenced this issue Mar 29, 2019
My suggestion for fixing the deprecated method for installing or updating setuptools using ez_setup.py
Also ensures that both pip and setuptools are 'bootstrapped' to the python environment, which does not always happen on a fresh install in Windows.

Fixes adafruit#96 

This can be made more robust by detecting if pip or setuptools is installed with `pip --version`, etc...
mcprat pushed a commit to mcprat/Adafruit_Python_GPIO that referenced this issue Apr 2, 2019
doing a better job than adafruit#96 

prints possible requirement for root or admin privileges
tries to import pip before calling ensurepip (which isnt needed for python 3)

this time, don't even keep the method from ez_setup.py, there's no point...
commenting it out with ''' ''' gave me an IOError

bump version because why not?
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant