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

Add dependency for pathlib on Python 2.7 (for tifffile) #436

Closed
pmiddend opened this issue Feb 22, 2019 · 4 comments
Closed

Add dependency for pathlib on Python 2.7 (for tifffile) #436

pmiddend opened this issue Feb 22, 2019 · 4 comments

Comments

@pmiddend
Copy link

I'm trying to build imageio with Python 2.7, but this fails because you're using pathlib:

/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/core/functions.py:259: in imwrite
    writer = get_writer(uri, format, "i", **kwargs)
/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/core/functions.py:187: in get_writer
    return format.get_writer(request)
/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/core/format.py:178: in get_writer
    return self.Writer(self, request)
/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/core/format.py:214: in __init__
    self._open(**self.request.kwargs.copy())
/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/plugins/tifffile.py:285: in _open
    load_lib()
/nix/store/msknadbwcwvm7n9lynl95yv4ialawf8g-python2.7-imageio-2.5.0/lib/python2.7/site-packages/imageio/plugins/tifffile.py:36: in load_lib
    from . import _tifffile
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    """

    from __future__ import division, print_function

    import sys
    import os
    import io
    import re
    import glob
    import math
    import zlib
    import time
    import json
    import enum
    import struct
>   import pathlib
E   ImportError: No module named pathlib
@almarklein
Copy link
Member

I think we missed that the tifffile module (that we copy along) now depends on pathlib, so we have not put pathlib in our dependencies for 2.7.

For now, you can just pip install pathlib and it should work.

@almarklein almarklein changed the title tiff plugin fails with Python 2.7 Add dependency for pathlib on Python 2.7 (for tifffile) Feb 22, 2019
@dotlambda
Copy link

@almarklein If I understand it correctly, pathlib will be an optional dependency on Python 2.7 in the future?

@almarklein
Copy link
Member

No, it's a hard dependency (for Python 2.7). In the future, new versions of imageio will no longer support Python 2.7.

@almarklein
Copy link
Member

Closing since Python 2.7 is no longer supported.

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

3 participants