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

Error when trying to combine 4x or 16x pixelshift from A7R4 #1

Closed
abrock opened this issue Mar 7, 2020 · 7 comments · May be fixed by #2
Closed

Error when trying to combine 4x or 16x pixelshift from A7R4 #1

abrock opened this issue Mar 7, 2020 · 7 comments · May be fixed by #2

Comments

@abrock
Copy link

abrock commented Mar 7, 2020

When combining 4 or 16 images from an R4 I get the following message:
KeyError: 1.25

I removed the try/catch block and got a stack trace:

Traceback (most recent call last):
  File "/home/alexander/media/sw/make_arq/make_arq.py", line 218, in <module>
    main()
  File "/home/alexander/media/sw/make_arq/make_arq.py", line 205, in main
    frames, width, height = get_frames(opts.frames)
  File "/home/alexander/media/sw/make_arq/make_arq.py", line 134, in get_frames
    frames.sort(key=key)
  File "/home/alexander/media/sw/make_arq/make_arq.py", line 132, in key
    g = seq2idx[1 + sn / 4]
KeyError: 1.25

I tried different methods to call the program, made no difference:

make_arq.py -o out.arq AR400274.ARW AR400275.ARW AR400276.ARW  AR400277.ARW
make_arq.py AR400274.ARW AR400275.ARW AR400276.ARW  AR400277.ARW -o out.arq
make_arq.py *ARW -o out.arq

I'm using Debian testing (bullseye).

@abrock
Copy link
Author

abrock commented Mar 8, 2020

I managed to upload the images I tried to combine:

http://129.206.118.30/pixelshift.zip (~2GB)

@agriggio
Copy link
Owner

agriggio commented Mar 9, 2020

Hi, and thanks for the report!
are you using python3 by any chance? I didn't have time to make the script python3 compatible yet, so that might be the culprit. If so, can you try testing with python2.7 and see if the problem persists?

@abrock
Copy link
Author

abrock commented Mar 9, 2020

Thank you for the quick response. Indeed, I use python3.

I tried to run the tool with python2 but it complains about the tifffile module missing:

python2 make_arq.py AR400274.ARW AR400275.ARW AR400276.ARW AR400277.ARW -o p2.arq
Traceback (most recent call last):
  File "make_arq.py", line 22, in <module>
    import tifffile
ImportError: No module named tifffile

TLDR: No matter what I tried, I can't get python2 to find the tifffile module.

I used aptitude to install the packages tifffile, python-imageio, no change. I used pip2 to install imageio, no change.

I tried to install tifffile using pip2 but that fails with a missing file (one which actually is installed on my machine)

 pip2 install tifffile
Collecting tifffile
  Using cached https://files.pythonhosted.org/packages/17/e8/76979051a2a15b23e2652a3cdeb7d3dfec518c54138bd0f8b5a5ef2c267a/tifffile-2020.2.16-py3-none-any.whl
Requirement already satisfied: numpy>=1.15.1 in /usr/lib/python3/dist-packages (from tifffile) (1.17.4)
Collecting imagecodecs>=2020.1.31 (from tifffile)
  Using cached https://files.pythonhosted.org/packages/75/95/3699360d15e5e5d450bbd16ea554fb185117947e76fc772078c4f59ae1c1/imagecodecs-2020.2.18.tar.gz
Building wheels for collected packages: imagecodecs
  Running setup.py bdist_wheel for imagecodecs ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zdg75dz2/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-tpew8fmm --python-tag cp37:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/imagecodecs
  copying imagecodecs/__init__.py -> build/lib.linux-x86_64-3.7/imagecodecs
  copying imagecodecs/imagecodecs.py -> build/lib.linux-x86_64-3.7/imagecodecs
  copying imagecodecs/_imagecodecs.py -> build/lib.linux-x86_64-3.7/imagecodecs
  copying imagecodecs/__main__.py -> build/lib.linux-x86_64-3.7/imagecodecs
  creating build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-lz4 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-charls -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libpng -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libaec -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-giflib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-liblzma -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-bitshuffle -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libmng -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-blosc -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-zopfli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-brunsli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-zlib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libwebp -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-lcms2 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-bzip2 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-fastlz -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-zstd -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-openjpeg -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-jpg_0xc3 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-lzf -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-jpeg -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-jxrlib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libjpeg-turbo -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-libtiff -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-brotli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-zfp -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  copying imagecodecs/licenses/LICENSE-snappy -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
  running build_ext
  building 'imagecodecs._aec' extension
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/imagecodecs
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-x86_64-3.7/imagecodecs/_aec.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_aec.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_aec.o -L/usr/local/lib -lm -laec -o build/lib.linux-x86_64-3.7/imagecodecs/_aec.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._bitshuffle' extension
  creating build/temp.linux-x86_64-3.7/bitshuffle-0.3.5
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_bitshuffle.c -o build/temp.linux-x86_64-3.7/imagecodecs/_bitshuffle.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_bitshuffle.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c bitshuffle-0.3.5/bitshuffle_core.c -o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/bitshuffle_core.o
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c bitshuffle-0.3.5/iochain.c -o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/iochain.o
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_bitshuffle.o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/bitshuffle_core.o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/iochain.o -L/usr/local/lib -lm -o build/lib.linux-x86_64-3.7/imagecodecs/_bitshuffle.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._blosc' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_blosc.c -o build/temp.linux-x86_64-3.7/imagecodecs/_blosc.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_blosc.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_blosc.o -L/usr/local/lib -lm -lblosc -o build/lib.linux-x86_64-3.7/imagecodecs/_blosc.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._brotli' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_brotli.c -o build/temp.linux-x86_64-3.7/imagecodecs/_brotli.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_brotli.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_brotli.o -L/usr/local/lib -lm -lbrotlienc -lbrotlidec -lbrotlicommon -o build/lib.linux-x86_64-3.7/imagecodecs/_brotli.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._bz2' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_bz2.c -o build/temp.linux-x86_64-3.7/imagecodecs/_bz2.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_bz2.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_bz2.o -L/usr/local/lib -lm -lbz2 -o build/lib.linux-x86_64-3.7/imagecodecs/_bz2.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._gif' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_gif.c -o build/temp.linux-x86_64-3.7/imagecodecs/_gif.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_gif.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_gif.o -L/usr/local/lib -lm -lgif -o build/lib.linux-x86_64-3.7/imagecodecs/_gif.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._imcd' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_imcd.c -o build/temp.linux-x86_64-3.7/imagecodecs/_imcd.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_imcd.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/imcd.c -o build/temp.linux-x86_64-3.7/imagecodecs/imcd.o
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_imcd.o build/temp.linux-x86_64-3.7/imagecodecs/imcd.o -L/usr/local/lib -lm -o build/lib.linux-x86_64-3.7/imagecodecs/_imcd.cpython-37m-x86_64-linux-gnu.so
  building 'imagecodecs._jpeg2k' extension
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DOPJ_HAVE_LIBLCMS2=1 -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_jpeg2k.c -o build/temp.linux-x86_64-3.7/imagecodecs/_jpeg2k.o
  In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                   from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                   from /usr/include/python3.7m/numpy/arrayobject.h:4,
                   from imagecodecs/_jpeg2k.c:598:
  /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     17 | #warning "Using deprecated NumPy API, disable it with " \
        |  ^~~~~~~
  imagecodecs/_jpeg2k.c:602:10: fatal error: openjpeg.h: No such file or directory
    602 | #include "openjpeg.h"
        |          ^~~~~~~~~~~~
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for imagecodecs
  Running setup.py clean for imagecodecs
Failed to build imagecodecs
Installing collected packages: imagecodecs, tifffile
  Running setup.py install for imagecodecs ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zdg75dz2/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cehjqjzh/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/imagecodecs
    copying imagecodecs/__init__.py -> build/lib.linux-x86_64-3.7/imagecodecs
    copying imagecodecs/imagecodecs.py -> build/lib.linux-x86_64-3.7/imagecodecs
    copying imagecodecs/_imagecodecs.py -> build/lib.linux-x86_64-3.7/imagecodecs
    copying imagecodecs/__main__.py -> build/lib.linux-x86_64-3.7/imagecodecs
    creating build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-lz4 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-charls -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libpng -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libaec -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-giflib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-liblzma -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-bitshuffle -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libmng -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-blosc -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-zopfli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-brunsli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-zlib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libwebp -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-lcms2 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-bzip2 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-fastlz -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-zstd -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-openjpeg -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-jpg_0xc3 -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-lzf -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-jpeg -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-jxrlib -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libjpeg-turbo -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-libtiff -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-brotli -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-zfp -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    copying imagecodecs/licenses/LICENSE-snappy -> build/lib.linux-x86_64-3.7/imagecodecs/licenses
    running build_ext
    building 'imagecodecs._aec' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/imagecodecs
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.linux-x86_64-3.7/imagecodecs/_aec.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_aec.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_aec.o -L/usr/local/lib -lm -laec -o build/lib.linux-x86_64-3.7/imagecodecs/_aec.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._bitshuffle' extension
    creating build/temp.linux-x86_64-3.7/bitshuffle-0.3.5
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_bitshuffle.c -o build/temp.linux-x86_64-3.7/imagecodecs/_bitshuffle.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_bitshuffle.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c bitshuffle-0.3.5/bitshuffle_core.c -o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/bitshuffle_core.o
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -Ibitshuffle-0.3.5 -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c bitshuffle-0.3.5/iochain.c -o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/iochain.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_bitshuffle.o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/bitshuffle_core.o build/temp.linux-x86_64-3.7/bitshuffle-0.3.5/iochain.o -L/usr/local/lib -lm -o build/lib.linux-x86_64-3.7/imagecodecs/_bitshuffle.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._blosc' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_blosc.c -o build/temp.linux-x86_64-3.7/imagecodecs/_blosc.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_blosc.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_blosc.o -L/usr/local/lib -lm -lblosc -o build/lib.linux-x86_64-3.7/imagecodecs/_blosc.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._brotli' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_brotli.c -o build/temp.linux-x86_64-3.7/imagecodecs/_brotli.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_brotli.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_brotli.o -L/usr/local/lib -lm -lbrotlienc -lbrotlidec -lbrotlicommon -o build/lib.linux-x86_64-3.7/imagecodecs/_brotli.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._bz2' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_bz2.c -o build/temp.linux-x86_64-3.7/imagecodecs/_bz2.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_bz2.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_bz2.o -L/usr/local/lib -lm -lbz2 -o build/lib.linux-x86_64-3.7/imagecodecs/_bz2.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._gif' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_gif.c -o build/temp.linux-x86_64-3.7/imagecodecs/_gif.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_gif.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_gif.o -L/usr/local/lib -lm -lgif -o build/lib.linux-x86_64-3.7/imagecodecs/_gif.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._imcd' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_imcd.c -o build/temp.linux-x86_64-3.7/imagecodecs/_imcd.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_imcd.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/imcd.c -o build/temp.linux-x86_64-3.7/imagecodecs/imcd.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.7/imagecodecs/_imcd.o build/temp.linux-x86_64-3.7/imagecodecs/imcd.o -L/usr/local/lib -lm -o build/lib.linux-x86_64-3.7/imagecodecs/_imcd.cpython-37m-x86_64-linux-gnu.so
    building 'imagecodecs._jpeg2k' extension
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DOPJ_HAVE_LIBLCMS2=1 -Iimagecodecs -I/usr/include/python3.7m -I/usr/lib/python3/dist-packages/numpy/core/include -c imagecodecs/_jpeg2k.c -o build/temp.linux-x86_64-3.7/imagecodecs/_jpeg2k.o
    In file included from /usr/include/python3.7m/numpy/ndarraytypes.h:1830,
                     from /usr/include/python3.7m/numpy/ndarrayobject.h:12,
                     from /usr/include/python3.7m/numpy/arrayobject.h:4,
                     from imagecodecs/_jpeg2k.c:598:
    /usr/include/python3.7m/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
       17 | #warning "Using deprecated NumPy API, disable it with " \
          |  ^~~~~~~
    imagecodecs/_jpeg2k.c:602:10: fatal error: openjpeg.h: No such file or directory
      602 | #include "openjpeg.h"
          |          ^~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-zdg75dz2/imagecodecs/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-cehjqjzh/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-zdg75dz2/imagecodecs/

I installed tifffile via conda, no change.

Now if I try to install tifffile via pip2 is says:

Requirement already satisfied: tifffile in /usr/lib/python3/dist-packages (2018.11.28)

But python2 still doesn't find the module.

@agriggio
Copy link
Owner

I suggest you try pyenv to manage multiple python environments, without messing up with the system. Looking at the above error messages, it's clear that pip2 is still trying to use python3.
I will try to update the code to python3 asap

@agriggio
Copy link
Owner

commit ceb4602 should fix this, can you please confirm when you have the chance?

@abrock
Copy link
Author

abrock commented Mar 10, 2020

I tried it and it works as expected. The 16x pixelshift shows some minor artifacts but I don't know if they are caused by RawTherapee, I'll need to capture more photos for testing.

@agriggio
Copy link
Owner

the 16x will show artifacts if there is a little motion, and they will be very hard to correct. That's because a 16x PS is essentially a 4x PS in which each of the frame is pre-combined. That's how the format works. It means that RT won't be able to detect and correct motion properly there, you need a pixel editor to fix them

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 a pull request may close this issue.

2 participants