-
-
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
Cannot install pandas 0.24.2 from source with Python 2.7 into an environment without NumPy #27435
Comments
are you sure you actually tried to install 0.24.x? and not the 0.25rc1 |
Looks like it is trying to download Our specified version for numpy is
|
right so numpy 1.17 is also python 3 only. guess would be that you have a too old pip, or are doing some odd type of installation. |
Inside
|
Can you show the command you're running? You shouldn't be executing |
Fairly standard procedure:
During pip install, when it's collecting pandas...
pandas ended up downloading much newer numpy: |
What platform? Are you passing |
You might also post the full output. |
requirements.txt
setup.py
And we call Note that I am redacting a lot of business logic related stuff, but the flow looks like that. |
So |
|
Should the
|
The above snippet works on our internal fork of pandas. All of our Py 2 apps have correct dependencies now. |
there are no more updates planned to the 0.24.x branch closing this issue as won't fix. |
Why not publish 0.24.3? There is no other changes beside setup.py. This way people who are unfortunately stuck on Python 2 won't have broken deployment. |
This seems more like an issue with your build process than with pandas.
…On Thu, Jul 18, 2019 at 8:21 PM Didip Kerabat ***@***.***> wrote:
Why not publish 0.24.3? There is no other changes beside setup.py. This
way people who are unfortunately stuck on Python 2 won't have broken
deployment.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#27435?email_source=notifications&email_token=AAKAOIVFU4FPN7BPZK7BVYDQAEJH7A5CNFSM4IETDH4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2KI57I#issuecomment-513052413>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIWG2L5M3IHDS4DGP3TQAEJH7ANCNFSM4IETDH4A>
.
|
I ran into this as well and figured out how to work around it without code modifications thanks to the comments here. I was originally building a Docker image from alpine:3.7, and in that container pip downloaded archive files for Numpy and Pandas rather than wheels. But when I switched my container image to python:2.7-stretch instead, then pip downloaded wheels for the versions it was supposed to and everything installed fine (I haven't tried python:2.7-alpine, though). So although if it was up to me I'd probably apply the proposed setup.py change just for ease of use, the actual source of the problem is external to pandas. If I was going to chase this further I'd probably start with pip's source and see how it would handle running in the alpine:3.7 image to figure out why it would select archive files in that situation. |
Just to summarize the workaround: if you're seeing this issue with Python 2.7, you need to ensure that you have NumPy installed in the environment |
Note that this is very easy to run into, simply doing
in a clean env with python 2.7 and latest pip gives the error (I am using Does anybody know what is actually the underlying reason, or if this has been reported to pip / setuptools? |
OK, there is pypa/pip#6667. So if I understand correctly, this is (within the limitations of setuptools handling of I think we should consider doing a 0.24.3 release for this. |
What's the fix? Adding a pyproject.toml to 0.24.3? |
Adding a "< 1.17" to numpy in That's the basically the only change they did in the "pandas27" (Tuxprogrammer#1, only need to look at changes in setup.py) |
The proper fix is to add a pyproject.toml, but let's try to do that again on master first and not in a bug-fix release. But as long as we don't use pyproject.toml, that means we don't get the proper build isolation of pip and we need to work with legacy setuptools / setup_requires. |
It would have to be Py2 only right? Else you can't install 0.24.2 with Python 3 and NumPy 1.17. Is anyone actually going to do the release though? I suppose we can cut corners and not build conda packages. Not sure if we can skip building docs. But we have to build both an sdist & wheels, even though the issue is just with the sdist. |
@TomAugspurger I have a patch to
|
@didip would you like to do a PR for this? |
This came up in the dev call today. We're interested in fixing this, but
I'm not sure if any maintainer is willing to spend too much time on it.
That said,
we are happy to
1. Accept a PR on the 0.24.x branch adding a max NumPy version for Python
2.7 (and a release note in 0.24.3 indicating this)
2. Make a tag and GitHub release with an sdist for 0.24.3 with just that
change from 0.24.2
3. Upload binaries and an sdist to PyPI
So, from anyone interested in fixing this, we're looking for a PR against
0.24.x, and someone interested
in going through pieces of the release
https://github.com/pandas-dev/pandas-release. Mainly
1. Building docs for 0.24.3 (we'll take care of uploading them)
2. Opening a PR on GitHub.com/macpython/pandas-wheels building wheels for
0.24.3
…On Wed, Sep 11, 2019 at 1:15 PM Joris Van den Bossche < ***@***.***> wrote:
@didip <https://github.com/didip> would you like to do a PR for this?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27435?email_source=notifications&email_token=AAKAOIWXRC3XR2CPQEC3CGDQJEYUNA5CNFSM4IETDH4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6PM6GA#issuecomment-530501400>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAKAOIW7KMSXOHLEUMHA3KDQJEYUNANCNFSM4IETDH4A>
.
|
@jorisvandenbossche yes I can send a PR. |
@didip that would be very welcome! |
At this point we don't have any further plans for a 24.x release, so unfortunately I don't think this is something we will address (if anyone disagrees feel free to reopen) |
For people reading this: there is an open PR fixing this, but that needs some further updates to get CI passing. |
This is how it worked for me for a similar problem: |
Workaround for pandas-dev#27435
Workaround for pandas-dev#27435
Code Sample, a copy-pastable example if possible
RuntimeError: Python version >= 3.5 required.
Problem description
Under this docs: https://pandas.pydata.org/pandas-docs/stable/whatsnew/v0.24.0.html
0.24.x is supposed to be backward compatible to Python 2.
Expected Output
0.24.2 should still work on Python 2.
The text was updated successfully, but these errors were encountered: