aleju / imgaug

Image augmentation for machine learning experiments.
http://imgaug.readthedocs.io
MIT License
14.42k stars 2.44k forks source link

new imageio version breaks over numpy versions. #807

Open morcoGreen opened 2 years ago

morcoGreen commented 2 years ago

imageio introduced new version which requires numpy > 1.20 over its ArrayLike object.

imgaug doesn't seem to set specfic version of imageio, therefore takes the latest version : https://github.com/aleju/imgaug/blob/master/requirements.txt#L12

The result: imgaug installation breaks code over incompatible numpy version:

    import imgaug
  File "/usr/local/lib/python3.6/site-packages/imgaug/__init__.py", line 7, in <module>
    from imgaug.imgaug import *  # pylint: disable=redefined-builtin
  File "/usr/local/lib/python3.6/site-packages/imgaug/imgaug.py", line 19, in <module>
    import imageio
  File "/usr/local/lib/python3.6/site-packages/imageio/__init__.py", line 22, in <module>
    from .core import FormatManager, RETURN_BYTES
  File "/usr/local/lib/python3.6/site-packages/imageio/core/__init__.py", line 16, in <module>
    from .format import Format, FormatManager
  File "/usr/local/lib/python3.6/site-packages/imageio/core/format.py", line 40, in <module>
    from ..config import known_plugins, known_extensions, PluginConfig, FileExtension
  File "/usr/local/lib/python3.6/site-packages/imageio/config/__init__.py", line 7, in <module>
    from .plugins import known_plugins, PluginConfig
  File "/usr/local/lib/python3.6/site-packages/imageio/config/plugins.py", line 4, in <module>
    from ..core.legacy_plugin_wrapper import LegacyPlugin
  File "/usr/local/lib/python3.6/site-packages/imageio/core/legacy_plugin_wrapper.py", line 6, in <module>
    from .v3_plugin_api import PluginV3, ImageProperties
  File "/usr/local/lib/python3.6/site-packages/imageio/core/v3_plugin_api.py", line 2, in <module>
    from numpy.typing import ArrayLike
ModuleNotFoundError: No module named 'numpy.typing'
csakaszamok commented 1 year ago

+1