Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/c/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 未能安装pysam 0.13_Python_C_Gcc_Pip_Pysam - Fatal编程技术网

Python 未能安装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:

我一直未能在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


有什么办法吗?

实际上我解决了,所以问题出在htslib上。解决方法:

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

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

有时软件需要修改(补丁)才能在特定的操作系统上工作。或者,当您安装了较旧的头文件时,它不会生成。或者它需要一个不同的编译器

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

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