-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
NumPy 2.0 support (AttributeError: "itemset") #21577
NumPy 2.0 support (AttributeError: "itemset") #21577
Comments
For starters we need to merge up our pybind11 fork to incorporate pybind/pybind11#5050, i.e., to v2.12.0. That means:
|
To unbreak our wheel builds, I believe can do something along these lines: --- a/tools/wheel/image/provision-python.sh
+++ b/tools/wheel/image/provision-python.sh
@@ -42,7 +42,7 @@ ln -s /usr/local/bin/python /usr/bin/python
# keeping them up to date if they are?
pip install \
matplotlib \
- numpy \
+ 'numpy < 2' \
pyyaml \
semantic-version \
setuptools \ |
https://drake-jenkins.csail.mit.edu/view/Production/job/linux-jammy-unprovisioned-gcc-wheel-nightly-release/111 is this issue; I am using the magic word |
I think possibly the last remaining obstacle is to figure out how to rework RobotLocomotion/pybind11@0da7ac7 to no longer rely on |
The first thing to try is if we can call |
FYI If I now try to do a fresh install of Drake and install all the prereqs I am still running into this issue. I run:
While I don't get an error from the above setup, I do run into the It seems that brew is still installing NumPy 2.0 and that I can run succesfully run
Is there a current workaround for this? Or is it currently not possible to build Drake from source on mac? |
Update/temporary fix: I found that applying this change WITHOUT setting up in a virtual environment seems to have worked without any issues for me (so far) |
On the Drake master branch as of just now, we hope that numpy 2.0 works correctly. Tomorrow's nightly wheel build (i.e., Next week's stable release 1.31.0 should also work. The actions remaining on this ticket are to investigate and clean up a couple of CI tests that we had to disable in order to pass:
|
Is your feature request related to a problem? Please describe.
NumPy 2.0 has been released. See https://numpy.org/devdocs/numpy_2_0_migration_guide.html.
Currently, importing certain
pydrake
versions crashes with this error:Known to fail:
Describe the solution you'd like
Drake should be compatible with both NumPy 1.x and 2.x.
Describe alternatives you've considered
In the meantime, pydrake users should depend on
numpy < 2
in their requirements file.Alternatively, you can use a nightly build (which itself depends on
numpy < 2
).The text was updated successfully, but these errors were encountered: