Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pin scikit-learn to version which support Py2 #64

Closed
wants to merge 1 commit into from

Conversation

brianmartin
Copy link
Contributor

@brianmartin brianmartin commented May 10, 2019

Without this, install of tensorflow-data-validation fails on Py2:

$ pip install tensorflow-data-validation
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: tensorflow-data-validation in /usr/local/lib/python2.7/site-packages (0.13.1)
Requirement already satisfied: numpy<2,>=1.14.5 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (1.16.3)
Requirement already satisfied: protobuf<4,>=3.7 in /usr/local/Cellar/protobuf/3.7.1/libexec/lib/python2.7/site-packages (from tensorflow-data-validation) (3.7.1)
Requirement already satisfied: six<2,>=1.10 in /usr/local/Cellar/protobuf/3.7.1/libexec/lib/python2.7/site-packages (from tensorflow-data-validation) (1.12.0)
Requirement already satisfied: joblib<1,>=0.12 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (0.13.2)
Requirement already satisfied: tensorflow-metadata<0.14,>=0.12.1 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (0.13.0)
Requirement already satisfied: apache-beam[gcp]<3,>=2.11 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (2.11.0)
Collecting scikit-learn<1,>=0.18 (from tensorflow-data-validation)
  Downloading https://files.pythonhosted.org/packages/9b/94/a24da18837e32ae2d5275b18308a542ae07891617501336b31c81a383cad/scikit-learn-0.21.0.tar.gz (12.2MB)
    100% |████████████████████████████████| 12.2MB 1.1MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/hf/wnv55n855zb4mcgfy4jsv9cr0000gn/T/pip-install-_FNQkF/scikit-learn/setup.py", line 30, in <module>
        % (platform.python_version(), sys.executable))
    RuntimeError: Scikit-learn requires Python 3.5 or later. The current Python version is 2.7.16 installed in /usr/local/opt/python@2/bin/python2.7.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hf/wnv55n855zb4mcgfy4jsv9cr0000gn/T/pip-install-_FNQkF/scikit-learn/

The scikit release notes announcing dropped support for Py<3.4 here: https://scikit-learn.org/stable/whats_new.html#version-0-21-0

Without this, install of tensorflow-data-validation fails on Py2:

```
$ pip install tensorflow-data-validation
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Requirement already satisfied: tensorflow-data-validation in /usr/local/lib/python2.7/site-packages (0.13.1)
Requirement already satisfied: numpy<2,>=1.14.5 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (1.16.3)
Requirement already satisfied: protobuf<4,>=3.7 in /usr/local/Cellar/protobuf/3.7.1/libexec/lib/python2.7/site-packages (from tensorflow-data-validation) (3.7.1)
Requirement already satisfied: six<2,>=1.10 in /usr/local/Cellar/protobuf/3.7.1/libexec/lib/python2.7/site-packages (from tensorflow-data-validation) (1.12.0)
Requirement already satisfied: joblib<1,>=0.12 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (0.13.2)
Requirement already satisfied: tensorflow-metadata<0.14,>=0.12.1 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (0.13.0)
Requirement already satisfied: apache-beam[gcp]<3,>=2.11 in /usr/local/lib/python2.7/site-packages (from tensorflow-data-validation) (2.11.0)
Collecting scikit-learn<1,>=0.18 (from tensorflow-data-validation)
  Downloading https://files.pythonhosted.org/packages/9b/94/a24da18837e32ae2d5275b18308a542ae07891617501336b31c81a383cad/scikit-learn-0.21.0.tar.gz (12.2MB)
    100% |████████████████████████████████| 12.2MB 1.1MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/hf/wnv55n855zb4mcgfy4jsv9cr0000gn/T/pip-install-_FNQkF/scikit-learn/setup.py", line 30, in <module>
        % (platform.python_version(), sys.executable))
    RuntimeError: Scikit-learn requires Python 3.5 or later. The current Python version is 2.7.16 installed in /usr/local/opt/python@2/bin/python2.7.

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/hf/wnv55n855zb4mcgfy4jsv9cr0000gn/T/pip-install-_FNQkF/scikit-learn/
```
brianmartin added a commit to spotify/spotify-tensorflow that referenced this pull request May 10, 2019
See tensorflow/data-validation#64
This commit may be reverted if that PR is merged.
brianmartin added a commit to spotify/spotify-tensorflow that referenced this pull request May 10, 2019
See tensorflow/data-validation#64
This commit may be reverted if that PR is merged.
@paulgc
Copy link
Member

paulgc commented May 10, 2019

Shouldn't scikit-learn/scikit-learn#13861 address this?

@brianmartin
Copy link
Contributor Author

Yes, looks like they've now resolved.

@brianmartin brianmartin deleted the patch-2 branch June 25, 2019 17:51
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants