- Notifications
You must be signed in to change notification settings - Fork547
Building with numpy > 2?#473
-
I'm working on a project where I'd like both Robotics Toolbox and some other modules that depend on numpy > 2. I'm throwing errors on the fact that spatialmath requires numpy < 2. Is there a way to rebuild spatialmath and spatialgeometry with new versions of numpy? I've forked the repos and tried rebuilding them, but I'm not super familiar with where to change the dependency so that the build tools don't just grab numpy 1.xx again. I'm working from a virtual environment, so I'm good to trash whatever. I'd love some guidance, and would even be willing to write a doc for the community on how to solve the problem if I work it out. |
BetaWas this translation helpful?Give feedback.
All reactions
I worked out a method that works for me.
First, I rebuilt the wheels for spatialmath, spatialgeometry, and swift to use numpy 2.2.2. This involved removing the version restrictions in the pyproject.toml files, including replacing references to "oldest-supported-numpy" with simply "numpy". I then rebuilt all three modules with numpy 2.2.2.
Within a clone of the roboticstoolbox working director, I pip installed the resulting wheels into the virtual environment. In the filemobile/DistanceTransformPlanner.py I removed line 5:from numpy import disp which was unused anyway. I then rebuilt the roboticstoolbox wheel. Finally, I installed these four wheels (spatialmath, spatialgeometry, swift-si…
Replies: 1 comment 3 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
I worked out a method that works for me. First, I rebuilt the wheels for spatialmath, spatialgeometry, and swift to use numpy 2.2.2. This involved removing the version restrictions in the pyproject.toml files, including replacing references to "oldest-supported-numpy" with simply "numpy". I then rebuilt all three modules with numpy 2.2.2. Within a clone of the roboticstoolbox working director, I pip installed the resulting wheels into the virtual environment. In the file I'll make my forks of the projects public if anybody wants to clone them and build their own wheels. The build command I used for each project was I should note that I wasn't able to run the test suite on rtb. I kept getting the same numpy module error. However, I'm not sure it matters. Caveat emptor. Unless I can assure myself that all the tests run, I'm not going to submit a pull request on these changes. @petercorke, if you'd like me to clean up my forks, ensure all tests run/pass, and make the pull requests to the various repos, I can put a weekend into that in the not too distant future. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hey Phil, I tried to reproduce your build steps and it seems you forgot to remove Aside from that, thanks for the fix! |
BetaWas this translation helpful?Give feedback.
All reactions
-
Glad you were able to get it to work! |
BetaWas this translation helpful?Give feedback.
All reactions
-
I pushed the change to my fork so that the deprecated |
BetaWas this translation helpful?Give feedback.
All reactions
😄 1