Skip to content
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

No module named 'imageio.v3' #38

Closed
magland opened this issue Jun 28, 2023 · 3 comments
Closed

No module named 'imageio.v3' #38

magland opened this issue Jun 28, 2023 · 3 comments

Comments

@magland
Copy link

magland commented Jun 28, 2023

I installed sleap-io via

pip install sleap-io

Then upon

import sleap_io

I get error

In [1]: import sleap_io
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[1], line 1
----> 1 import sleap_io

File ~/miniconda3/envs/dev/lib/python3.9/site-packages/sleap_io/__init__.py:8
      5 __version__ = "0.0.6"
      7 from sleap_io.model.skeleton import Node, Edge, Skeleton, Symmetry
----> 8 from sleap_io.model.video import Video
      9 from sleap_io.model.instance import (
     10     Point,
     11     PredictedPoint,
   (...)
     14     PredictedInstance,
     15 )
     16 from sleap_io.model.labeled_frame import LabeledFrame

File ~/miniconda3/envs/dev/lib/python3.9/site-packages/sleap_io/model/video.py:11
      9 from typing import Tuple, Optional, Optional
     10 import numpy as np
---> 11 from sleap_io.io.video import VideoBackend
     14 @define
     15 class Video:
     16     """`Video` class used by sleap to represent videos and data associated with them.
     17 
     18     This class is used to store information regarding a video and its components.
   (...)
     29     See also: VideoBackend
     30     """

File ~/miniconda3/envs/dev/lib/python3.9/site-packages/sleap_io/io/video.py:12
     10 import attrs
     11 import h5py
---> 12 import imageio.v3 as iio
     13 import numpy as np
     15 try:

ModuleNotFoundError: No module named 'imageio.v3'

The version of imageio installed is 2.15.0

@talmo
Copy link
Contributor

talmo commented Jun 28, 2023

Hi @magland,

Sorry about that -- we do all of our environment management and testing using mamba so we were always pulling in newer versions of imageio.

2.15 is a little old, so I'm surprised that's what you had in the environment. Here's the relevant discussion regarding the v3 API: imageio/imageio#725

I'll pin our deps to a newer version now, but try updating it with:

pip install --upgrade "imageio>=2.26"

Cheers,

Talmo

@magland
Copy link
Author

magland commented Jun 28, 2023

Thanks Talmo, that did the trick.

But I got a warning, because ironically, it's sleap that requires imageio<=2.15.0

https://github.com/talmolab/sleap/blob/1a0404c0ffae7b248eb360562b0bb95a42a287b6/requirements.txt#L22

@talmo
Copy link
Contributor

talmo commented Jun 28, 2023

Hah of course! We're working on updating all the deps but it's been tricky...

I think we had pinned imageio because of imgaug, which is another one we need to address.

Glad this worked, though I imagine sleap will probably have other annoying dependencies at the moment as well.

Closing for now but feel free to reply or open another issue if there's any other problems with imageio!

@talmo talmo closed this as completed Jun 28, 2023
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

No branches or pull requests

2 participants