-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
Pip install of version 0.24 is broken for platforms without wheels #25193
Comments
I believe this to be a function of recent changes because |
This is really weird, as doing |
@gfyoung I suppose you tried with binary wheels? I can reproduce this with, installing the following in a fresh environment with just python and pip:
For pandas 0.23.4 it indeed works. |
From a quick look, this might be caused by the changes in #21879 (which I don't fully understand though), as it is caused by |
@jorisvandenbossche You are right, this is the change that broke things. I checked with this Dockerfile:
|
|
What I understand from the diff in #21879 is that before, we just passed |
cythonize is recommended way to compile cython modules. A lot of the dependency tracking we used to do manually in setup.py cythonize handles automatically. cythonize also takes care of figuring out which files need to be re-compiled vs are re-usable (I know statsmodels used to do this manually, not sure about pandas) |
But this
Can you detail this thought a bit more? |
I don't know what happens within
So the thought was that if Again, pure speculation. |
We also need to update the release infra or testing to ensure that the pip test environment does not have Cython installed.
… On Feb 7, 2019, at 12:43, jbrockmendel ***@***.***> wrote:
I suppose there is something that happens within setuptools.setup that installs numpy (?) that we could shoe-horn into the top of maybe_cythonize
Can you detail this thought a bit more?
I don't know what happens within setuptools.setup, but am speculating that there is something like:
def setup(...):
install_declared_dependencies(...)
everything_else(...)
So the thought was that if maybe_cythonize being called before setup was a problem because dependencies were not installed, this might be fixable by calling install_declared_dependencies at the top of maybe_cythonize.
Again, pure speculation.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I don't think we want to start meddling with how setuptools installs dependencies. It seems our use of the custom We should probably also look again into PEP517/518 support with a pyproject.toml, as it seems that support for that in pip has improved a lot since last time we tried (and reverted).
Yes, was thinking the same. But didn't we already have a test for pip installing from source in https://github.com/pandas-dev/pandas-ci ? |
Ah, yes. We do at
https://github.com/pandas-dev/pandas-ci/blob/master/ci/install.sh#L23.
I guess the issue here is that that env still has *numpy* installed. So we
should maybe just create a clean env with just Python and pip.
…On Thu, Feb 7, 2019 at 1:36 PM Joris Van den Bossche < ***@***.***> wrote:
So the thought was that if maybe_cythonize being called before setup was
a problem because dependencies were not installed, this might be fixable by
calling install_declared_dependencies at the top of maybe_cythonize.
I don't think we want to start meddling with how setuptools installs
dependencies. It seems our use of the custom cmd_class made this work
before (the check for where numpy's include path is also done in there), so
maybe we will need to revert the use of cythonize? (or at least make it
conditional on the presence of already compiled c files)
We should probably also look again into PEP517/518 support with a
pyproject.toml, as it seems that support for that in pip has improved a lot
since last time we tried (and reverted).
We also need to update the release infra or testing to ensure that the pip
test environment does not have Cython installed.
Yes, was thinking the same. But didn't we already have a test for pip
installing from source in https://github.com/pandas-dev/pandas-ci ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#25193 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIqC3jEmDXDUCe6RjslVnC762NOv6ks5vLIBZgaJpZM4al35s>
.
|
For declaring build time requirements there is the I'll submit a PR. |
@xhochy yes, we did that before, but reverted it after lots of troubles (#20775, #20718). But as I said above, we should probably look into it again, since it seems that most of the problems we had last year are more or less solved in pip nowadays. I am only not fully sure if we should do it for a bug-fix release though (we could still fix the setup.py for 0.24.x, and then try out the pyproject.toml again for 0.25) |
@jorisvandenbossche I will dig a bit deeper into the |
Yes, for sure we should try to add it again (and thanks for looking into it!). I am mainly wondering if we should see it as a fix for this issue (for 0.24.x). |
@jbrockmendel would you have time to look into this? I might think that with some conditional check before calling the cythonize (whether both cython and numpy are installed, like we now already have a check that cython is installed), it might work |
@jorisvandenbossche sure. Is the desired behavior just to check if numpy is installed and if not raise? |
Not sure if it should raise. I think you should be able to call |
OK. The fix that comes to mind is a check inside |
I don't know all the possible commands of setuptools enough to know if specifically checking for that would be enough. Best might be to simply test it out.
In any case, it seems to me that there is some duplication now in the setup.py, as we have both functionality to cythonize in the |
IIRC the coverage implementation isn't quite orthogonal to the usage of
Some of that code is shared.
This is partially an upstream problem with I also don't know the setuptools API. It shouldn't be that hard to find a complete-ish list of the possible commands and sort them by whether cythonize should be called or not, should it? |
Well, I don't care that much how it is done, I mainly care about it being fixed for 0.24.2. I only know that before #21879 it was working, and that I don't have the time to dive into setuptools inner details right now, so if we don't find another solution, reverting it is an option for me. But the suggestion about checking which setup command is ran, might make sense (at least, eg scipy does things like that: https://github.com/scipy/scipy/blob/master/setup.py)
Or you could also say that their recommendation to use |
I maintain this is the thing to do. Go for it.
|
I currently don't have time to look more into it. |
I'll look into this today, as I think this is a blocker for 0.24.2? |
Code Sample, a copy-pastable example if possible
Easiest way to reproduce this is in a fresh docker container, as below
Problem description
Note that pip installing numpy and then pandas does work
But the standalone command is broken.
Unfortunately, this means that a requirements.txt file is insufficient to for setting up a new environment with pandas installed (like in a docker container).
The text was updated successfully, but these errors were encountered: