Error Installing Cellpose-Napari
hljoyce opened this issue · 1 comments
Hello!
I am a python n00b and clueless regarding this error. I'm on a Mac.
I have tried installing the plugin via the bundled package, via the command line, and also by cloning the repository and directing it to create an environment.
Perhaps the error is on my end?
Cheers
Holly
Error installing cellpose-napari environment:
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/envs/cellpose_napari/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-1zt19tz2/imagecodecs_340da6ae51694244abfa952480f4b15a/setup.py'"'"'; file='"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-1zt19tz2/imagecodecs_340da6ae51694244abfa952480f4b15a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-record-13bbi99p/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/envs/cellpose_napari/include/python3.8/imagecodecs Check the logs for full command output.
failed
CondaEnvException: Pip failed
Error installing Cellpose-napari:
RROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-yczm9qb4/imagecodecs/setup.py'"'"'; file='"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-yczm9qb4/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 /private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-record-u2tab9io/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/imagecodecs
cwd: /private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-yczm9qb4/imagecodecs/
Complete output (96 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.8
creating build/lib.macosx-10.9-x86_64-3.8/imagecodecs
copying imagecodecs/numcodecs.py -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs
copying imagecodecs/init.py -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs
copying imagecodecs/_imagecodecs.py -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs
copying imagecodecs/imagecodecs.py -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs
copying imagecodecs/main.py -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs
creating build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-zfp -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-fastlz -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-postgresql -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libjpeg -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-liblzma -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libmng -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-jpg_0xc3 -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-bzip2 -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libtiff -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-zlib -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-openjpeg -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libjpeg-turbo -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libaivf -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-aom -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-snappy -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-lerc -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-lz4 -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-brunsli -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-dav1d -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-giflib -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-highway -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-rav1e -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libdeflate -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-zopfli -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-cfitsio -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-zstd -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-bitshuffle -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-liblj92 -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-charls -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-brotli -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libwebp -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libaec -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/PATENTS-rav1e -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-zlib-ng -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-libpng -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-jpeg -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-lcms2 -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-blosc -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-lzf -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-jxrlib -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
copying imagecodecs/licenses/LICENSE-jpeg-xl -> build/lib.macosx-10.9-x86_64-3.8/imagecodecs/licenses
running build_ext
skipping 'imagecodecs/_aec.c' Cython extension (up-to-date)
skipping 'imagecodecs/_bitshuffle.c' Cython extension (up-to-date)
skipping 'imagecodecs/_blosc.c' Cython extension (up-to-date)
skipping 'imagecodecs/_brotli.c' Cython extension (up-to-date)
skipping 'imagecodecs/_bz2.c' Cython extension (up-to-date)
skipping 'imagecodecs/_deflate.c' Cython extension (up-to-date)
skipping 'imagecodecs/_gif.c' Cython extension (up-to-date)
skipping 'imagecodecs/_imcd.c' Cython extension (up-to-date)
skipping 'imagecodecs/_jpeg2k.c' Cython extension (up-to-date)
skipping 'imagecodecs/_jpeg8.c' Cython extension (up-to-date)
skipping 'imagecodecs/_jpegsof3.c' Cython extension (up-to-date)
skipping 'imagecodecs/_jpegxr.c' Cython extension (up-to-date)
skipping 'imagecodecs/_ljpeg.c' Cython extension (up-to-date)
skipping 'imagecodecs/_lz4.c' Cython extension (up-to-date)
skipping 'imagecodecs/_lzf.c' Cython extension (up-to-date)
skipping 'imagecodecs/_lzma.c' Cython extension (up-to-date)
skipping 'imagecodecs/_pglz.c' Cython extension (up-to-date)
skipping 'imagecodecs/_png.c' Cython extension (up-to-date)
skipping 'imagecodecs/_rcomp.c' Cython extension (up-to-date)
skipping 'imagecodecs/_shared.c' Cython extension (up-to-date)
skipping 'imagecodecs/_snappy.c' Cython extension (up-to-date)
skipping 'imagecodecs/_tiff.c' Cython extension (up-to-date)
skipping 'imagecodecs/_webp.c' Cython extension (up-to-date)
skipping 'imagecodecs/_zlib.c' Cython extension (up-to-date)
skipping 'imagecodecs/_zopfli.c' Cython extension (up-to-date)
skipping 'imagecodecs/_zstd.c' Cython extension (up-to-date)
building 'imagecodecs._aec' extension
creating build/temp.macosx-10.9-x86_64-3.8
creating build/temp.macosx-10.9-x86_64-3.8/imagecodecs
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -Iimagecodecs -I/opt/anaconda3/include/python3.8 -I/opt/anaconda3/lib/python3.8/site-packages/numpy/core/include -c imagecodecs/_aec.c -o build/temp.macosx-10.9-x86_64-3.8/imagecodecs/_aec.o
In file included from imagecodecs/_aec.c:612:
In file included from /opt/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /opt/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/ndarrayobject.h:12:
In file included from /opt/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/ndarraytypes.h:1822:
/opt/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings]
#warning "Using deprecated NumPy API, disable it with "
^
imagecodecs/_aec.c:619:10: fatal error: 'libaec.h' file not found
#include "libaec.h"
^~~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-yczm9qb4/imagecodecs/setup.py'"'"'; file='"'"'/private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-install-yczm9qb4/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 /private/var/folders/xp/wkbnsly95xs1l8kn3tvcr3s5pvk9fq/T/pip-record-u2tab9io/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/imagecodecs Check the logs for full command output.
hi @hljoyce, in general, if you ever see a big long error message like this, where it mentions "gcc
" or talks about "compiling" things when trying to install something with pip, it means the package, or one of its dependencies contains a C dependency, and your computer doesn't have the necessary stuff to convert that C code to runnable binary code. It's a common issue.
this is one case where installing with conda
will likely work better than pip.
in this case, the package in question is the "imagecodecs". So, with your environment active, try running "conda install imagecodecs" on its own, before installing cellpose and other stuff. (in fact, you could try installing most of the things in the environment file with conda).