-
-
Notifications
You must be signed in to change notification settings - Fork 30.9k
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
Pandas cannot import numpy in free-threaded version of 3.13.0b2 #120653
Comments
This issue should be closed, and reopened in the Numpy and Pandas repos. The latest release of Numpy, version 2.0.0, came out only yesterday. It does not support Python 3.13.
Nonetheless, Numpy support for Python 3.13 is actively being worked on: numpy/numpy#26157 @kdgts Pip will have attempted to build them both, and quite likely silently failed (unless all of the following build dependencies were installed: https://numpy.org/doc/stable/building/index.html). |
I think there may be an underlying issue in CPython here where the packages are shared between the free-threaded and default builds in ways that lead to confusing error messages. @kdgts wrote:
But this is installing pandas and numpy packages for the default build (not free-threaded) You'd want to install them by |
There are Linux and Mac nightlies for cython, numpy and scipy at https://anaconda.org/scientific-python-nightly-wheels/repo. Pandas support is being worked on and as soon as that is working wheels for pandas should appear there as well. We are tracking ecosystem-wide support for free-threaded Python 3.13 here: https://github.com/Quansight-Labs/free-threaded-compatibility |
Well, given that everything works just fine with python13 regular but fails with python13 free-threaded it's pretty obvious that issue is not with numpy or pandas but rather with free-threaded python |
My apologies - it was taking so much longer than normal to install pandas, I assumed pip had hung. But it completed eventually. I have reproduced the behaviour (after installing pandas into a venv first), and it is the same error as in your post, pretty much verbatim. Moreover, on simply importing numpy:
|
For pandas and Python 3.13 free-threading (and more generally Python 3.13) you probably want to follow pandas-dev/pandas#58734. It looks like there is some work going on but that for now there are some known issues. If you really want to start testing locally, my main advice would be to rely as much as possible on development wheels as hinted by @ngoldbaum in #120653 (comment). I am not sure there are some on Windows right now though but for Linux and macOS there is more chance. For example for numpy, you want to look at files with Here are some things you need to do (there may be other caveats):
If you really want to compile from source you need at the time of writing a cython development wheel so something like:
|
Not yet, Windows is still in the works. Python 3.13.0b2 was the first version that included free-threaded support in Python itself; there is an issue with it in |
Bug report
Bug description:
python -m pip install pandas
This will also install numpy
C:\apps\python313\python.exe <path to file>/KDTest.py
Result: all good, Done is printed
C:\apps\python313\python3.13t.exe <path to file>/KDTest.py
Result:
CPython versions tested on:
3.13
Operating systems tested on:
Windows
The text was updated successfully, but these errors were encountered: