-
Notifications
You must be signed in to change notification settings - Fork 86
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
no warning if numpy not present when installing pip #189
Comments
Thanks for this @ashander, and sorry for the hassle it caused upstream. I don't understand how this can be happening --- could the The rationale for making numpy optional is that it's a hard requirement for a lot of installations, and compiling from scratch through pip isn't pleasant. For users of the basic library it's not needed, as we only use it when importing and exporting tree sequences though the tables API. |
It totally makes sense to have numpy optional, and once I saw the warning I
was surprised it hadn't been triggered here. I'll report back after trying
some debug in setup.py. My knowledge of setup.py / setuptools is limited
and I could stand to improve it.
…On Sat, Apr 15, 2017 at 12:41 AM, Jerome Kelleher ***@***.***> wrote:
Thanks for this @ashander <https://github.com/ashander>, and sorry for
the hassle it caused upstream. I don't understand how this can be happening
--- could the pip inside in your environment be invoking a different
Python somehow? Would you mind putting a bit of debug into setup.py to see
if you can figure it out?
The rationale for making numpy optional is that it's a hard requirement
for a lot of installations, and compiling from scratch through pip isn't
pleasant. For users of the basic library it's not needed, as we only use it
when importing and exporting tree sequences though the tables API.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/jeromekelleher/msprime/issues/189#issuecomment-294278178>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAfLOMA1emh4o52v_XeM828AkrHzdFexks5rwHS0gaJpZM4M-Ci1>
.
|
So I've poked around a bit. In the same env as above:
My working hypothesis is that pip doesn't care about or propagate setup.py's to stdout (or stderr!). So, the question is how to address. Some options:
|
Ah, that makes sense, thanks @ashander. I had a feeling that just putting a We should probably be using the |
Heh, I forgot to mention, but should have. I tried I'll poke around a bit and see if there's a known way to get |
OK. So it seems we can't warn pip users on install. It used to be possible to print warnings, but no longer is. From the closed issue on this it appears pypa have no plans to fix. Some packages that used to print warnings no longer do (e.g., conda references the issue but doesn't have a work around). |
Thanks for looking into this @ashander. OK, I think the only sensible thing to do here is to have a |
Great. I'll contribute a patch |
I think we can close this issue. There's not a lot we can do about pip swallowing up our warnings. |
When installing from github via
pip
, no warning shows up in a conda env that has nonumpy
. I think there should be one, based on current code in setup.py.example output
The text was updated successfully, but these errors were encountered: