【问题标题】:Pip install fails at building wheel at subpackage?Pip install 在子包中构建轮子失败?
【发布时间】:2019-11-13 01:00:24
【问题描述】:

有点编码初学者。我正在寻找使用 pip install 安装一个包,我在更新我的 python 之前能够获得它(目前我的 Mac 上有 Python 2.7.16 和 2.8.0)。

我尝试安装的包名为 CITE-seq-Count (https://hoohm.github.io/CITE-seq-Count/Installation/)

我已经尝试过他们推荐的安装方式:

pip install CITE-seq-Count==1.4.3

并且会得到这个涉及 pysam 包的错误。我试图单独安装 pysam 但也有同样的错误。我看到其他人建议在 anaconda 上安装,但我不确定我是否能够在那里安装并在终端上使用。感谢您的帮助!

 Building wheel for pysam (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gb/5mct_n_922x_zd87l3gz93xc0000gn/T/pip-install-2lxzoax8/pysam/setup.py'"'"'; __file__='"'"'/private/var/folders/gb/5mct_n_922x_zd87l3gz93xc0000gn/T/pip-install-2lxzoax8/pysam/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 /private/var/folders/gb/5mct_n_922x_zd87l3gz93xc0000gn/T/pip-wheel-z6kkdnyu --python-tag cp38
       cwd: /private/var/folders/gb/5mct_n_922x_zd87l3gz93xc0000gn/T/pip-install-2lxzoax8/pysam/
  Complete output (277 lines):
  # pysam: no cython available - using pre-compiled C
  # pysam: htslib mode is shared
  # pysam: HTSLIB_CONFIGURE_OPTIONS=None
  # pysam: (sysconfig) CC=gcc
  # pysam: (sysconfig) CFLAGS=-Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g
  # pysam: (sysconfig) LDFLAGS=-arch x86_64 -g
  checking for gcc... gcc
...

                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:14673:255: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libchtslib_pyx, __pyx_n_s_call, 304, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 304, __pyx_L1_error)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:14685:255: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libchtslib_pyx, __pyx_n_s_bool, 306, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 306, __pyx_L1_error)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:14697:258: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libchtslib_pyx, __pyx_n_s_nonzero, 308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 308, __pyx_L1_error)
                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:14709:254: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libchtslib_pyx, __pyx_n_s_eq, 310, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 310, __pyx_L1_error)
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:14721:254: error: too many arguments to function call, expected 15, have 16
      __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libchtslib_pyx, __pyx_n_s_ne, 312, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 312, __pyx_L1_error)
                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    pysam/libchtslib.c:18225:9: error: too many arguments to function call, expected 15, have 16
            __pyx_empty_bytes  /*PyObject *lnotab*/
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    pysam/libchtslib.c:318:82: note: expanded from macro '__Pyx_PyCode_New'
              PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
              ~~~~~~~~~~                                                             ^~~~
    /Library/Frameworks/Python.framework/Versions/3.8/include/python3.8/code.h:122:12: note: 'PyCode_New' declared here
    PyAPI_FUNC(PyCodeObject *) PyCode_New(
               ^
    7 errors generated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 

【问题讨论】:

  • Python 3.8.0 可能是用来代替 Python 2.8.0。

标签: python python-3.x pip bioinformatics


【解决方案1】:

这是pysam 中的一个问题,似乎尚未与 Python 3.8 完全兼容。这个问题已经有一个 github issue,可能值得关注它以查看是否有解决方案: https://github.com/pysam-developers/pysam/issues/860

目前,如果您不依赖 3.8 功能(对我有用),回退到 Python 3.7 可能是最简单的解决方案。

【讨论】:

  • 你说得对,看起来这可能是个问题。但是在问题中用户没有开始编译,所以这个答案对我来说似乎是一种误导。
  • @sinoroc 我不太关注。从问题中发布的日志来看,看起来(a)gcc 被发现(`检查 gcc...gcc`)和(b)编译开始并失败。但我认为没有发布整个输出,因为它很长......
  • 你说得对。我的错。用户可能应该降级到 Python 3.7。如果您编辑答案以提及这一点,我可以投票。
  • 这对我有用,降级到 3.7。谢谢大家的帮助!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-09-05
  • 2016-11-14
  • 2017-12-03
  • 2017-03-09
  • 2021-05-23
  • 2019-09-08
  • 1970-01-01
相关资源
最近更新 更多