Skip to content

imageio.imread replaced with imageio.v2.imread #143

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

Merged
merged 2 commits into from
Aug 29, 2022

Conversation

rifatrakib
Copy link
Contributor

imageio.imread is not supported anymore, imageio.v2.imread is suggested as a replacement from the module maintainers.

Copy link
Collaborator

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the proposed update @rifatrakib .

The proposed change is failing, likely because imageio doesn't support lazy importing. From their docs, it looks like you'd need to do something like: import imageio.v2 as iio.

Also, it looks like there's also an imageio.v3 now as well, which seems to be recommended for new code. Should we update to v3 instead?

@rifatrakib
Copy link
Contributor Author

I am using Python 3.8.5 with conda, it worked perfectly fine in my setup. But since v3 is the latest way of doing this, I will make adjustments accordingly. Thanks for the feedback.

@rossbar
Copy link
Collaborator

rossbar commented Aug 10, 2022

Okay, it looks like a dependency resolution problem. We're getting very old versions of both Pillow (which is requiring a local wheel build, which is subsequently failing) and imageio (which explains why imageio.v2 or imageio.v3 fails - because these pkgs don't exist yet in imageio v2.9.0).

I suspect this is related to the gym/ataripy dependencies for the RL notebook. This change looks good, but unfortunately will be blocked until we fix this other dependency problem. If nothing else, this is a strong motivation to remove these unsupported dependencies, which I will try to do ASAP.

Thanks for the fixup @rifatrakib . Sorry it's not going as quickly as it should do to the nice can of worms you've inadvertently discovered!

imageio.imread not supported anymore, imageio.v2.imread is suggested as a replacement from the module maintainers.
`imageio.imread` is not supported and `imageio.v2` has issues with lazy import, replaced with `imageio.v3.imread` instead as recommended by the `imageio` module maintainers.
Copy link
Collaborator

@rossbar rossbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that #144 is in we can push this forward! Thanks again @rifatrakib !

@rossbar rossbar merged commit 635b0e8 into numpy:main Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants