sony / nnabla

Neural Network Libraries
https://nnabla.org/
Apache License 2.0
2.73k stars 334 forks source link

limit matplotlib version for windows #1259

Closed TomonobuTsujikawa closed 6 months ago

TomonobuTsujikawa commented 6 months ago

With matplotlib latest version, we met an error on Windows platform for python>3.8.

The error was caused here:

>       plt.imshow(tile_images(digits.images[:64, None]), cmap='gray', interpolation='nearest')
(snip)
    @contextmanager
    def _restore_foreground_window_at_end():
>       foreground = _c_internal_utils.Win32_GetForegroundWindow()
E       ValueError: PyCapsule_New called with null pointer

This imshow is normal use, but the error was thrown by _c_internal_utils.Win32_GetForegroundWindow() which is a Windows system function, so we think this might be a permission or system environment issue for matplotlib 3.9. So currently, we decide to limit matplotlib version to be lower than 3.9 for nnabla tests on Windows only. The version on Linux will not be limited.