Python 未能安装pysam 0.13
我一直未能在macOS High Sierra上安装pysam 0.13。 总结一下我的两个错误:Python 未能安装pysam 0.13,python,c,gcc,pip,pysam,Python,C,Gcc,Pip,Pysam,我一直未能在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:
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
有什么办法吗?实际上我解决了,所以问题出在htslib上。解决方法:
export HTSLIB_LIBRARY_DIR=/usr/local/lib
export HTSLIB_INCLUDE_DIR=/usr/local/include
pip install pysam
问题是相同目录中的htslib库相互矛盾 有时软件需要修改(补丁)才能在特定的操作系统上工作。或者,当您安装了较旧的头文件时,它不会生成。或者它需要一个不同的编译器 由于您的系统(macOS)缺乏良好的本机包管理,我建议您使用具有自己的包管理器的Python发行版,例如 这样的发行版有很多预编译包(比如pysam)。它们可以为你节省很多时间