pysam-developers / pysam

Pysam is a Python package for reading, manipulating, and writing genomics data such as SAM/BAM/CRAM and VCF/BCF files. It's a lightweight wrapper of the HTSlib API, the same one that powers samtools, bcftools, and tabix.
https://pysam.readthedocs.io/en/latest/
MIT License
782 stars 274 forks source link

pip install pysam fails on build/temp.macosx-10.10-intel-2.7/pysam #549

Closed behzadmtl closed 7 years ago

behzadmtl commented 7 years ago

MacBook-Air:~ root# pip install pysam Collecting pysam Using cached pysam-0.12.0.1.tar.gz Installing collected packages: pysam Running setup.py install for pysam ... error Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-D4kyRr/pysam/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-1rTUzT-record/install-record.txt --single-version-externally-managed --compile:

pysam: cython is available - using cythonize if necessary

# pysam: htslib mode is shared
# pysam: HTSLIB_CONFIGURE_OPTIONS=--enable-plugins
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/tmp/pip-build-D4kyRr/pysam/htslib':
configure: error: C compiler cannot create executables
See `config.log' for more details
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/tmp/pip-build-D4kyRr/pysam/htslib':
configure: error: C compiler cannot create executables
See `config.log' for more details
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/private/tmp/pip-build-D4kyRr/pysam/htslib':
configure: error: C compiler cannot create executables
See `config.log' for more details
# pysam: htslib configure options: None
# pysam: htslib_config LIBS=-lz -lm -lbz2 -llzma
# pysam: htslib_config PLATFORM=Darwin
# pysam: htslib_config LIBHTS_OBJS=kfunc.o knetfile.o kstring.o bcf_sr_sort.o bgzf.o errmod.o faidx.o hfile.o hfile_net.o hts.o md5.o multipart.o probaln.o realn.o regidx.o sam.o synced_bcf_reader.o vcf_sweep.o tbx.o textutils.o thread_pool.o vcf.o vcfutils.o cram/cram_codecs.o cram/cram_decode.o cram/cram_encode.o cram/cram_external.o cram/cram_index.o cram/cram_io.o cram/cram_samtools.o cram/cram_stats.o cram/files.o cram/mFILE.o cram/open_trace_file.o cram/pooled_alloc.o cram/rANS_static.o cram/sam_header.o cram/string_alloc.o
# pysam: htslib_config LDFLAGS=
# pysam: config_option: ENABLE_PLUGINS=0
# pysam: config_option: HAVE_COMMONCRYPTO=0
# pysam: config_option: HAVE_GMTIME_R=0
# pysam: config_option: HAVE_HMAC=0
# pysam: config_option: HAVE_IRODS=0
# pysam: config_option: HAVE_LIBCURL=0
# pysam: config_option: HAVE_MMAP=0
running install
running build
running build_py
creating build
creating build/lib.macosx-10.10-intel-2.7
creating build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/__init__.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/bcftools.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/config.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/namedtuple.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/Pileup.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/samtools.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/utils.py -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/version.py -> build/lib.macosx-10.10-intel-2.7/pysam
creating build/lib.macosx-10.10-intel-2.7/pysam/include
copying pysam/include/__init__.py -> build/lib.macosx-10.10-intel-2.7/pysam/include
package init file 'samtools/__init__.py' not found (or not a regular file)
package init file 'bcftools/__init__.py' not found (or not a regular file)
package init file 'samtools/win32/__init__.py' not found (or not a regular file)
package init file 'htslib/__init__.py' not found (or not a regular file)
package init file 'htslib/htslib/__init__.py' not found (or not a regular file)
copying pysam/libcalignedsegment.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcalignmentfile.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcbcf.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcbcftools.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcfaidx.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libchtslib.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcsamfile.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcsamtools.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libctabix.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libctabixproxies.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcutils.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/libcvcf.pxd -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/cbcftools_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/csamtools_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/htslib_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/pysam_stream.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/pysam_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/samfile_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
copying pysam/tabix_util.h -> build/lib.macosx-10.10-intel-2.7/pysam
creating build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/bam.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/bam2bcf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/bam_endian.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/bam_lpileup.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/bam_plbuf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/config.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/pysam.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/sam.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/sam_header.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/sam_opts.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/sample.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/samtools.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/stats_isize.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
copying samtools/version.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools
creating build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/bam2bcf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/bam_sample.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/bcftools.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/bin.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/call.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/config.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/convert.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/filter.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/gvcf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/hclust.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/HMM.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/khash_str2str.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/kheap.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/kmin.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/mw.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/ploidy.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/prob1.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/pysam.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/rbuf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/regidx.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/smpl_ilist.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/tsv2vcf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/vcfbuf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/vcmp.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
copying bcftools/version.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/bcftools
creating build/lib.macosx-10.10-intel-2.7/pysam/include/samtools/win32
copying samtools/win32/xcurses.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools/win32
copying samtools/win32/zconf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools/win32
copying samtools/win32/zlib.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/samtools/win32
creating build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/bcf_sr_sort.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/config.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/hfile_internal.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/hts_internal.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/thread_pool_internal.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
copying htslib/version.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib
creating build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/bgzf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/cram.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/faidx.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/hfile.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/hts.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/hts_defs.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/hts_endian.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/hts_log.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/kbitset.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/kfunc.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/khash.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/khash_str2int.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/klist.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/knetfile.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/kseq.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/ksort.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/kstring.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/regidx.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/sam.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/synced_bcf_reader.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/tbx.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/thread_pool.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/vcf.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/vcf_sweep.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
copying htslib/htslib/vcfutils.h -> build/lib.macosx-10.10-intel-2.7/pysam/include/htslib/htslib
running build_ext
skipping 'pysam/libchtslib.c' Cython extension (up-to-date)
building 'pysam.libchtslib' extension
creating build/temp.macosx-10.10-intel-2.7
creating build/temp.macosx-10.10-intel-2.7/pysam
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -Ipysam -I. -I/usr/local/include -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c pysam/libchtslib.c -o build/temp.macosx-10.10-intel-2.7/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
In file included from pysam/libchtslib.c:4:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
error: command 'cc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -u -c "import setuptools, tokenize;file='/private/tmp/pip-build-D4kyRr/pysam/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-1rTUzT-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-D4kyRr/pysam/

My environment is OS X Yosemite

AndreasHeger commented 7 years ago

Hi, you will probably need to have the developer tools installed - my suggestion though is to use conda to install.

AndreasHeger commented 7 years ago

Closing this for now.