无法在Python 3.6中使用pip安装pysam

时间:2018-09-21 19:51:10

标签: python pip install pysam

Macbook Mac OSX 10.12.6 的Python 3.6.2 cython 0.28.5 点18.0

我正在尝试安装pysam:

pip3 install pysam

它一直在以下位置出现错误:

creating build/temp.macosx-10.6-intel-3.6/htslib/cram
htslib/cram/cram_io.c:63:10: fatal error: 'os/lzma_stub.h' file not found
#include "os/lzma_stub.h"
         ^~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

似乎this issuethisthis是版本问题。但是我尝试了pip3 install pysam==0.130.140.15,但结果相同。

建议?

真的不想处理安装conda ...

2 个答案:

答案 0 :(得分:0)

我的错! pip3 install pysam==0.13实际上有效。只是为了后代而留在这里。

答案 1 :(得分:0)

很显然,您缺少lzma,它现在是xz库(https://tukaani.org/xz/)的一部分。安装它,看看是否可行。在OSX中,您可以使用自制软件brew install xz来安装它。

另一种选择是安装htslibhttp://www.htslib.org/download/)或samtools(可在htslib网址中找到)。