Compatibility Issues with NumPy 2.0

Category: 
Resolution: 
Unresolved

The newly released version of NumPy 2.0 includes substantial internal changes, including migrating code from C to C++. These modifications have led to significant issues with backwards compatibility, resulting in numerous breaking changes to both the Python and C APIs. As a consequence, packages built against NumPy 1.xx may encounter ImportError messages. To ensure compatibility, these packages must be rebuilt against NumPy 2.0.

Recommendation for Addressing the Issue:

  1. Follow the Migration Guide: Refer to the NumPy 2.0 Migration Guide for detailed instructions.

  2. Update Packages: Ensure all packages are updated to their latest versions.

  3. Contact Developers: Reach out to package developers for updates or compatibility information.

  4. Create a Project-Specific Environment: Set up a dedicated Python environment for your project to manage package versions effectively. Refer to the OSC documentation for guidance on using the Conda package manager.

  5. Separate Environments for Compatibility: Maintain separate Python environments for packages that are compatible with NumPy 1.x and NumPy 2.x.