cgohlke / imagecodecs

Image transformation, compression, and decompression codecs
https://pypi.org/project/imagecodecs
BSD 3-Clause "New" or "Revised" License
114 stars 21 forks source link

Pip install of imagecodecs 2020.12.22 fails on Mac #6

Closed tomgoddard closed 3 years ago

tomgoddard commented 3 years ago

On macOS 10.15.7 "pip3 install imagecodecs" tries to compile from source because there is no binary Mac PyPi wheel and then fails with

imagecodecs/_aec.c:617:10: fatal error: 'libaec.h' file not found
#include "libaec.h"
         ^~~~~~~~~~
1 warning and 1 error generated.
error: command 'clang' failed with exit status 1
tomgoddard commented 3 years ago

Here is the full pip output.

pip_output.txt

tomgoddard commented 3 years ago

Work-around is to use older imagecodecs which has a Mac binary wheel.

pip3 install imagecodecs==2020.5.30

cgohlke commented 3 years ago

Mac, Linux, and conda-forge binaries are expected to lag in features and release date. They are built at https://github.com/Czaki/imagecodecs_build and https://github.com/conda-forge/imagecodecs-feedstock

Czaki commented 3 years ago

@cgohlke If you do not publish the source on PyPI then pip will automatically use the older release of imagecodecs. Maybe a delay in publishing the source on PyPI will be a good idea?

tomgoddard commented 3 years ago

Thanks for the info about the builds. I use tifffile in ChimeraX and I thought in the past imagecodecs was an optional dependency. At some point I guess it became a required dependency since now the pip install of tifffile (2020.9.3) pulls in imagecodecs. In our nightly builds of ChimeraX visualization software the fact that tifffile pulled in imagecodecs and I had not specified a version for imagecodecs caused our Mac nightly build to fail when yesterday's imagecodecs update was released on PyPi. Now that I know tifffile requires imagecodecs I have specified the version of imagecodecs I want (2020.5.30) and all is working.

Czaki commented 3 years ago

After every upgrade list of libraries, macos wheel needs much more work than Linux one.

cgohlke commented 3 years ago

Fixed in v2020.12.24. Thanks @Czaki

toloudis commented 3 years ago

fyi, we are seeing this issue again today with the 2021.5.20 release

normanius commented 1 year ago

I get this error again when installing version 2023.3.16.

My system:

The command used:

python -m pip install imagecodecs

The entire console output: console.txt

Any ideas?

cgohlke commented 1 year ago

The entire console output: creating build/lib.macosx-12.4-arm64-3.10

There are no binary wheels for macosx-arm64 because I don't have access to such hardware. See also #44.