8000 BLD Adds max numpy version for python=3.6 by thomasjpfan · Pull Request #18992 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

BLD Adds max numpy version for python=3.6 #18992

New issue

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

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

Already on GitHub? Sign in to your account

Closed

Conversation

thomasjpfan
Copy link
Member

Reference Issues/PRs

Address one of the items in #18977

What does this implement/fix? Explain your changes.

This PR adds a max numpy version for python==3.6.

@ogrisel
Copy link
Member
ogrisel commented Dec 11, 2020

I triggered a wheel build so that we can test pip installs a numpy version compatible with Python 3.6 when fetching the dependencies of scikit-learn.

However in #18956 (comment) I do not understand why pip would try to install numpy >= 1.20 since 1.20 has not yet been released on pypi.org at this time...

@glemaitre
Copy link
Member

So it seems to work as expected.

However in #18956 (comment) I do not understand why pip would try to install numpy >= 1.20 since 1.20 has not yet been released on pypi.org at this time...

Just some big supposition (I need to check the log), they added a --pre to install the scikit-learn release candidate. As a side effect it caught the numpy release candidate as well?

@ogrisel
Copy link
8000
Member
ogrisel commented Dec 14, 2020

Thinking more about this, I think this looks like a problem of setuptools when running python setup.py build/develop/install on their project with a dependency on scikit-learn or numpy.

I checked that pip under Python 3.6 has not problem ignoring numpy 1.20:

$ pip install --pre numpy
Collecting numpy
  Downloading numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
     |████████████████████████████████| 14.5 MB 10.4 MB/s 
Installing collected packages: numpy
Successfully installed numpy-1.19.4

When installing scikit-learn from source and running python setup.py build/develop/install & co, we explicitly require the user to install numpy first, because automatically installing build dependencies with setuptools without pip is not really possible.

Note that metadata commands such as python setup.py dist_info/egg_info/check work without numpy (see #18999).

So in retrospect, I don't think there is anything we should change in the scikit-learn setup.py file. If people have trouble installing their (build) dependencies with setuptools, we would just point them to either use pip install --editable . or to install the dependencies directly with pip or conda without relying on setuptools.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0