Skip to content

Visdom & Pillow-simd #367

Closed
Closed
@0phoff

Description

@0phoff

I am using pillow-simd, which is a drop-in replacement for pillow that offers a speedup for certain operations by using SIMD operations of your CPU.
However, when installing visdom, it installs pillow, which overwrites my pillow-simd install.

They solved this in pytorch/vision, by checking if pillow-simd is installed on the system in setup.py.

from pkg_resources import get_distribution, DistributionNotFound

def get_dist(pkgname):
    try:
        return get_distribution(pkgname)
    except DistributionNotFound:
        return None

requirements = [ ... ]
pillow_ver = ' >= 4.1.1'
pillow_req = 'pillow-simd' if get_dist('pillow-simd') is not None else 'pillow'
requirements.append(pillow_req + pillow_ver)

I think the only drawback of using this, is if you provide wheels, as it would then be unable to determine whether you use pillow-simd or not.
I guess this is no concern here right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions