Skip to content

BUG: pandas doesn't install on python 3.10 #43715

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

Closed
2 of 3 tasks
eyalk11 opened this issue Sep 23, 2021 · 9 comments
Closed
2 of 3 tasks

BUG: pandas doesn't install on python 3.10 #43715

eyalk11 opened this issue Sep 23, 2021 · 9 comments
Assignees
Labels
Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions Python 3.10
Milestone

Comments

@eyalk11
Copy link

eyalk11 commented Sep 23, 2021

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the master branch of pandas.

Reproducible Example

pip install pandas (installs 1.3.3)

Issue Description

I tried to install on 3.10.0rc2

ultiarray\scalartypes.obj
    scalartypes.c
    numpy\core\include\numpy/npy_3kcompat.h(227): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\common.h(239): warning C4244: 'return': conversion from 'npy_uintp' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(425): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(426): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(1899): warning C4244: 'function': conversion from 'npy_double' to 'npy_float', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(1902): warning C4244: 'function': conversion from 'npy_double' to 'npy_float', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2577): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2561): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2577): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
    numpy\core\src\multiarray\scalartypes.c.src(2967): error C2440: 'function': cannot convert from 'double' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2967): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2967): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2976): error C2440: 'function': cannot convert from 'double' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2976): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2975): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2982): error C2440: 'function': cannot convert from 'double' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2982): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2981): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2967): error C2440: 'function': cannot convert from 'npy_longdouble' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2967): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2967): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2976): error C2440: 'function': cannot convert from 'npy_longdouble' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2976): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2975): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2982): error C2440: 'function': cannot convert from 'npy_longdouble' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2982): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2981): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(2997): error C2440: 'function': cannot convert from 'double' to 'PyObject *'
    numpy\core\src\multiarray\scalartypes.c.src(2997): warning C4024: '_Py_HashDouble': different types for formal and actual parameter 1
    numpy\core\src\multiarray\scalartypes.c.src(2997): error C2198: '_Py_HashDouble': too few arguments for call
    numpy\core\src\multiarray\scalartypes.c.src(3913): warning C4244: 'return': conversion from 'npy_intp' to 'int', possible loss of data

Expected Behavior

Works

Installed Versions

Not relevant

@eyalk11 eyalk11 added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 23, 2021
@eyalk11
Copy link
Author

eyalk11 commented Sep 23, 2021

Notice that I do have numpy install, but the requirements require numpy that is not compatible.

@eyalk11
Copy link
Author

eyalk11 commented Sep 23, 2021

OK, I tested it without the numpy requirement and it worked. You just need to alter it. My numpy is 1.21.2 .

@lithomas1 lithomas1 added Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Sep 23, 2021
@lithomas1 lithomas1 added this to the 1.3.4 milestone Sep 23, 2021
@lithomas1 lithomas1 self-assigned this Sep 23, 2021
@lithomas1
Copy link
Member

lithomas1 commented Sep 23, 2021

Just to confirm, the wheels work correctly and the issue is that our pyproject.toml does not specify a compatible numpy?
Can you post the full logs from the failed install and post what version of numpy you had initially before you upgraded to 1.21.2?

Thank you.

@eyalk11
Copy link
Author

eyalk11 commented Sep 26, 2021

Yep, it seems to be the case. I don't know what happend now, I tried to build it(after clean). It seems fine(though, didn't look deeper). Anyway, here is the log. Last time I tried setup.py install. Now setup.py build .

  • I think I did setup install without removing deps. Of course I tried pip install first, that didn't work.
    build.log

@jreback
Copy link
Contributor

jreback commented Oct 6, 2021

@fangchenli @lithomas1 I think after we merge #43729 could attempt to backport here (but likely needs to be manual).

@craigboman
Copy link

This also fails for me, but I think this is a python 3.10 compatibility bug with the dependency numpy, rather than pandas. Looking at numpy/numpy#20045

@lithomas1
Copy link
Member

lithomas1 commented Oct 14, 2021

OK, installing from sdist works now for me so the fix I put up seems to work. @craigboman The issue was that there's no wheels, so pip compiles from source(sdist). And when compiling from source, numpy got pinned to a version not compatible with Python 3.10. This should be fixed in our next release.

@simonjayhawkins
Copy link
Member

This should be fixed in our next release.

@lithomas1 Anything more to do here or can we close this?

@simonjayhawkins
Copy link
Member

closing. can re-open or open new issue if problems with the latest release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build Library building on various platforms Compat pandas objects compatability with Numpy or Python functions Python 3.10
Projects
None yet
Development

No branches or pull requests

5 participants