【问题标题】:imagecodecs python library won't installimagecodecs python库不会安装
【发布时间】:2020-05-20 00:17:57
【问题描述】:

我试图在 Jetson Xavier 上使用 pip 安装 python scikit-image 库,但收到一条非常长的错误消息,表明它未能为“imagecodecs”库构建轮子。我尝试自行安装图像编解码器并收到类似的错误消息。

看了一圈,发现this的问题,错误和我的一模一样。但是,更新 pip 的解决方案并没有解决问题。

错误信息:

ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/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-5h3fo15u
       cwd: /tmp/pip-install-iu5szk39/imagecodecs/

...

  At top level:
  imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
   static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for imagecodecs
  Running setup.py clean for imagecodecs
Failed to build imagecodecs
Installing collected packages: imagecodecs
    Running setup.py install for imagecodecs ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/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-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs
         cwd: /tmp/pip-install-iu5szk39/imagecodecs/

...
At top level:
    imagecodecs/_tiff.c:10261:47: warning: ‘__pyx_f_11imagecodecs_5_tiff_memtif_new’ defined but not used [-Wunused-function]
     static __pyx_t_11imagecodecs_5_tiff_memtif_t *__pyx_f_11imagecodecs_5_tiff_memtif_new(toff_t __pyx_v_size, toff_t __pyx_v_inc) {
                                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-iu5szk39/imagecodecs/setup.py'"'"'; __file__='"'"'/tmp/pip-install-iu5szk39/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-ttclns6b/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.6/imagecodecs Check the logs for full command output.

【问题讨论】:

    标签: python python-3.x linux pip


    【解决方案1】:

    尝试使用此命令升级 pip。

    sudo -H pip3 install --upgrade pip
    sudo -H pip2 install --upgrade pip
    

    pip 现在应该是最新版本。

     $ pip3 --version
    pip 20.1.1 from ...
    

    然后使用 pip3 安装

    pip3 install scikit-image
    

    【讨论】:

    • 我正在使用最新版本的 pip,但我尝试升级以防万一,最新版本已经安装,但仍然无法安装图像编解码器。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-01-29
    • 2022-01-28
    • 2011-03-01
    • 1970-01-01
    • 2013-11-28
    • 2014-04-28
    相关资源
    最近更新 更多