Skip to content

[MRG + 2] Ensure dependencies installed - #4371

Merged
ogrisel merged 1 commit into
scikit-learn:masterfrom
saketkc:fix_setup
Apr 28, 2015
Merged

ogrisel merged 1 commit into
scikit-learn:masterfrom
saketkc:fix_setup

Conversation

@amueller

amueller commented Mar 9, 2015

Copy link
Copy Markdown
Member

I think we should point to the installation instructions on the sklearn website, or maybe directly recommend binary packages (anaconda / canopy)

@saketkc

saketkc commented Mar 10, 2015

Copy link
Copy Markdown
Contributor Author

I updated it. But I am somehow still not happy with it. I think we should keep it more explicit?

@saketkc

saketkc commented Mar 11, 2015

Copy link
Copy Markdown
Contributor Author

@amueller Comments?

Comment thread setup.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say " on the scikit-learn website"

@amueller

Copy link
Copy Markdown
Member

Apart from my comment it seems fine with me.

@saketkc
saketkc force-pushed the fix_setup branch 3 times, most recently from 081bd4d to 6d14d52 Compare March 11, 2015 23:03
@saketkc

saketkc commented Mar 16, 2015

Copy link
Copy Markdown
Contributor Author

Good to merge @amueller?

@amueller amueller changed the title FIX: Ensure dependencies installed [MRG + 1] Ensure dependencies installed Mar 16, 2015
@amueller

Copy link
Copy Markdown
Member

Yeah, it looks good to me.

@saketkc

saketkc commented Mar 25, 2015

Copy link
Copy Markdown
Contributor Author

Bumping this up.

@amueller

Copy link
Copy Markdown
Member

closes #1495.

Comment thread setup.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd much rather a space between Python and (NumPy)

@amueller amueller changed the title [MRG + 1] Ensure dependencies installed [MRG] Ensure dependencies installed Apr 1, 2015
@amueller

amueller commented Apr 1, 2015

Copy link
Copy Markdown
Member

Gave my +1 to fast, sys.exit is not good

@saketkc

saketkc commented Apr 2, 2015

Copy link
Copy Markdown
Contributor Author

Done.

@amueller

amueller commented Apr 2, 2015

Copy link
Copy Markdown
Member

OK, LGTM now :)

@amueller amueller changed the title [MRG] Ensure dependencies installed [MRG + 1] Ensure dependencies installed Apr 2, 2015
@kastnerkyle

Copy link
Copy Markdown
Member

Looks good!

@kastnerkyle kastnerkyle changed the title [MRG + 1] Ensure dependencies installed [MRG + 2] Ensure dependencies installed Apr 16, 2015
@saketkc

saketkc commented Apr 20, 2015

Copy link
Copy Markdown
Contributor Author

bump.

@ogrisel

ogrisel commented Apr 28, 2015

Copy link
Copy Markdown
Member

Hi, in its recent versions (along with recent enough versions of pip), the setup.py has an setup_requires for numpy that works meaning that pip install scipy works by first building and installing numpy from source if not available and then re-running the scipy setup.py.

https://github.com/scipy/scipy/blob/master/setup.py#L201

@ogrisel

ogrisel commented Apr 28, 2015

Copy link
Copy Markdown
Member

Ok I changed my mind: for windows users it's true that it won't help them trying to build make pip try numpy and scipy source and they will get obscure build error messages.

For MacOSX users there are wheels on PyPI for numpy / scipy & scikit-learn so the setup.py is never executed (unless the user explicitly ask to build from the source one way or another). Mac OSX users are therefore neither impacted by the merge of this PR nor by the alternative which would be to configure setup_requires like scipy does wrt. numpy.

For Linux users using the pip version currently shipped in most "stable" distros, namely pip 1.5.4 for Ubuntu 14.04 LTS, the setup_requires solution does not work properly for scipy. Based on some tests, only pip 6 and later can properly get numpy installed before trying to install scipy from source.

Let's merge this PR for now and we might want to explore again the possibility to use setup_requires once we have numpy and scipy publish wheels for windows on PyPI and major linux distros ship pip 6+ by default.

ogrisel added a commit that referenced this pull request Apr 28, 2015
[MRG + 2] Ensure dependencies installed
@ogrisel
ogrisel merged commit 95f9be5 into scikit-learn:master Apr 28, 2015
@GaelVaroquaux

Copy link
Copy Markdown
Member

Thanks @ogrisel : I agree with this decision.

In addition, I fear very much the results of a "pip install -U" on an already-working system with the setup_requires.

@ogrisel

ogrisel commented Apr 28, 2015

Copy link
Copy Markdown
Member

In addition, I fear very much the results of a "pip install -U" on an already-working system with the setup_requires.

Without a sudo it's not going to break anything (if the user has a --user flag or is working in a venv). With a sudo I agree it could be a problem but then the hack used by scipy's setup.py to only populate setup_requires and install_requires if numpy is missing would give a reasonable protection.

@saketkc
saketkc deleted the fix_setup branch April 28, 2015 14:09
@amueller

Copy link
Copy Markdown
Member

Why wouldn't it break anything with a --user flag? The imported version afterwards would be the slow one, right?

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.

6 participants