无法安装pysam 0.13

问题描述 投票:1回答:2

我一直未能在macOS High Sierra上安装pysam 0.13。总结我的两个错误:

htslib/htslib/hts.h:142:9: error: missing ',' between enumerators
    json HTS_DEPRECATED_ENUM("Use htsExactFormat 'htsget' instead") = htsget,
        ^
        ,  htslib/htslib/hts.h:142:29: error: expected '= constant-expression' or end of
      enumerator definition
    json HTS_DEPRECATED_ENUM("Use htsExactFormat 'htsget' instead") = htsget,
                        ^

产生了2个错误。

错误:命令'gcc'失败,退出状态为1

有什么想法怎么办?

python c gcc pip pysam
2个回答
1
投票

有时软件需要修改(补丁)才能在特定的操作系统上运行。或者,如果安装了较旧的头文件,则无法构建。或者它需要一个不同的编译器。

由于您的系统(macOS)缺乏良好的本机包管理,我建议您使用具有自己的包管理器的Python发行版,例如anaconda

这样的发行版有很多预编译的包(比如pysam)。它们可以为您节省大量时间。


1
投票

其实我解决了所以问题是htslib。解决:

export HTSLIB_LIBRARY_DIR=/usr/local/lib
export HTSLIB_INCLUDE_DIR=/usr/local/include
pip install pysam

问题是相同目录中的矛盾htslib库。

© www.soinside.com 2019 - 2024. All rights reserved.