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

Fixed #1429: "pip install numpy scipy" was failing #453

Merged
merged 4 commits into from Feb 27, 2013

Conversation

Projects
None yet
4 participants
@ilblackdragon
Contributor

ilblackdragon commented Feb 27, 2013

It was failing because of the pre installation request from pip to ./setup.py egg_info (which is perfectly valid request and shouldn't fail), before numpy actually was installed.

This is pretty popular issue:
http://projects.scipy.org/scipy/ticket/1429
pypa/pip#25
pypa/pip#272
https://github.com/sjsrey/pysal/issues/207
http://bb10.com/python-testing-general/2011-06/msg00028.html
etc...

This really annoying when using tox - with this fix just set up requirements file and be sure that it will work on any machine (including on machines has already preinstalled numpy with different version that required).

Fix is straightforward - not to use numpy for commands that are not connected with build and install.

Fixed #1429: pip install numpy scipy was failing because of the prein…
…stallation request from pip to scipy.setup egg_info, before numpy actually is installed
@ilblackdragon

This comment has been minimized.

Show comment
Hide comment
@ilblackdragon

ilblackdragon Feb 27, 2013

Contributor

Btw, https://github.com/pydata/pandas did have the same issue pandas-dev/pandas#2732, but they fixed it pandas-dev/pandas@28e2a38 couple weeks ago

Contributor

ilblackdragon commented Feb 27, 2013

Btw, https://github.com/pydata/pandas did have the same issue pandas-dev/pandas#2732, but they fixed it pandas-dev/pandas@28e2a38 couple weeks ago

Show outdated Hide outdated setup.py
Show outdated Hide outdated setup.py

ilblackdragon added some commits Feb 27, 2013

Changed blacklist to whitelist of commands that are allowed to be use…
…d without numpy installed. If setuptools not found it falls to distutils. Corrected version generation and population in case of non-numpy usage.
Separated getting version from writing it to the version.py file in s…
…etup.py. Pre-installation case can call it directly without saving file.
@ilblackdragon

This comment has been minimized.

Show comment
Hide comment
@ilblackdragon

ilblackdragon Feb 27, 2013

Contributor

@pv I made changes according to your suggestions and fixed issues with handling version.py file. Please, review and let me know.

Contributor

ilblackdragon commented Feb 27, 2013

@pv I made changes according to your suggestions and fixed issues with handling version.py file. Please, review and let me know.

pv added a commit that referenced this pull request Feb 27, 2013

Merge pull request #453 from branch ilblackdragon/master
MAINT: setup.py: don't use numpy.distutils unless necessary

This should allow Scipy to be installed by pip (which calls setup.py egg_info)
when Numpy is not yet installed on the system.

@pv pv merged commit 71e595f into scipy:master Feb 27, 2013

@pv

This comment has been minimized.

Show comment
Hide comment
@pv

pv Feb 27, 2013

Member

Thanks, seems to work.

Member

pv commented Feb 27, 2013

Thanks, seems to work.

@rgommers

This comment has been minimized.

Show comment
Hide comment
@rgommers

rgommers Mar 2, 2013

Member

We now have a working egg_info command, but the contents of SOURCES.txt are of course incomplete. Is that file used for anything by pip these days?

Member

rgommers commented Mar 2, 2013

We now have a working egg_info command, but the contents of SOURCES.txt are of course incomplete. Is that file used for anything by pip these days?

@pv

This comment has been minimized.

Show comment
Hide comment
@pv

pv Mar 2, 2013

Member

@rgommers: pip install at least succeeds. The generated SOURCES.txt is incomplete, but it wil be incomplete anyway if you have setuptools enabled (because numpy.distutils add_data* break when setuptools is active), see gh-454.

Member

pv commented Mar 2, 2013

@rgommers: pip install at least succeeds. The generated SOURCES.txt is incomplete, but it wil be incomplete anyway if you have setuptools enabled (because numpy.distutils add_data* break when setuptools is active), see gh-454.

@lell lell referenced this pull request Sep 1, 2013

Closed

merged upstream changes #2

vijaykramesh pushed a commit to change/scikit-learn that referenced this pull request Oct 31, 2013

Fix setup.py to resolve numpy requirement
during pre-install. This should allow
'pip install numpy cython scipy scikit-learn'
to install scikit.

This fix is based of issue and fixes in Scipy:
scipy/scipy#453
branden/scipy@ad0dd3e

@pv pv added this to the 0.14.0 milestone Apr 27, 2014

@fnielsen

This comment has been minimized.

Show comment
Hide comment
@fnielsen

fnielsen Dec 15, 2014

I am wondering what happened to this issue. Cheeseshop scipy-0.14.0 setup.py still has from numpy.distutils.core import setup

fnielsen commented Dec 15, 2014

I am wondering what happened to this issue. Cheeseshop scipy-0.14.0 setup.py still has from numpy.distutils.core import setup

@fnielsen fnielsen referenced this pull request Dec 15, 2014

Open

pip install numpy #18

@pv

This comment has been minimized.

Show comment
Hide comment
@pv

pv Dec 15, 2014

Member

This issue is fixed, as explained above.

Member

pv commented Dec 15, 2014

This issue is fixed, as explained above.

@pv

This comment has been minimized.

Show comment
Hide comment
@pv

pv Dec 15, 2014

Member

However, it's true that the fix will be included only in the next Scipy
version.

Member

pv commented Dec 15, 2014

However, it's true that the fix will be included only in the next Scipy
version.

@fnielsen

This comment has been minimized.

Show comment
Hide comment
@fnielsen

fnielsen Dec 15, 2014

Sorry, I now see the 'if ... egg_info' has been added. Thanks

fnielsen commented Dec 15, 2014

Sorry, I now see the 'if ... egg_info' has been added. Thanks

@pv

This comment has been minimized.

Show comment
Hide comment
@pv

pv Dec 15, 2014

Member

Actually, the fix in this PR was not enough to make a clean pip
install to work --- there's a second part in b615ea8 which is
also required, and which was not included in 0.14.0 (but will be in
the next ones).

Member

pv commented Dec 15, 2014

Actually, the fix in this PR was not enough to make a clean pip
install to work --- there's a second part in b615ea8 which is
also required, and which was not included in 0.14.0 (but will be in
the next ones).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment