Unable to install pysam (Failed building wheel for pysam)

1,245 views
Skip to first unread message

Adarsh Singh

unread,
Dec 8, 2019, 4:25:26 AM12/8/19
to Pysam User group
I have tried all the solutions provided by users and experts in different threads, and I keep getting this error. Earlier, pysam was working fine, but suddenly few days it stopped (is used in checkm). Please provide me detailed solution. Really thankful!!!



Collecting pysam
Building wheels for collected packages: pysam
  Running setup.py bdist_wheel for pysam ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bkca2rmp/pysam/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpq3pk9fynpip-wheel- --python-tag cp36:
  # pysam: no cython available - using pre-compiled C
  # pysam: htslib mode is shared
  # pysam: HTSLIB_CONFIGURE_OPTIONS=None
  # pysam: (env) CC=/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc
  # pysam: (env) CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include
  # pysam: (env) LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/ciralab/miniconda3/lib -Wl,-rpath-link,/home/ciralab/miniconda3/lib -L/home/ciralab/miniconda3/lib
  checking for gcc... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... yes
  checking for /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc option to accept ISO C89... none needed
  checking for ranlib... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-ranlib
  checking for grep that handles long lines and -e... /bin/grep
  checking for C compiler warning flags... -Wall
  checking for special C compiler options needed for large files... no
  checking for _FILE_OFFSET_BITS value needed for large files... no
  checking for _LARGEFILE_SOURCE value needed for large files... no
  checking shared library type for unknown-Linux... plain .so
  checking how to run the C preprocessor... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cpp
  checking for egrep... /bin/grep -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for stdlib.h... (cached) yes
  checking for unistd.h... (cached) yes
  checking for sys/param.h... yes
  checking for getpagesize... yes
  checking for working mmap... yes
  checking for gmtime_r... yes
  checking for fsync... yes
  checking for drand48... yes
  checking whether fdatasync is declared... yes
  checking for fdatasync... yes
  checking for library containing log... -lm
  checking for zlib.h... yes
  checking for inflate in -lz... yes
  checking for library containing recv... none required
  checking for bzlib.h... yes
  checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
  checking for lzma.h... yes
  checking for lzma_easy_buffer_encode in -llzma... yes
  checking for libdeflate.h... yes
  checking for libdeflate_deflate_compress in -ldeflate... yes
  checking for curl_easy_pause in -lcurl... yes
  checking for CCHmac... no
  checking for library containing HMAC... -lcrypto
  checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes
  configure: creating ./config.status
  config.status: creating config.mk
  config.status: creating htslib.pc.tmp
  config.status: creating config.h
  config.status: config.h is unchanged
  # pysam: htslib configure options: --enable-libcurl
  make: ./version.sh: Command not found
  make: ./version.sh: Command not found
  # pysam: htslib_config LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/ciralab/miniconda3/lib -Wl,-rpath-link,/home/ciralab/miniconda3/lib -L/home/ciralab/miniconda3/lib
  # 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 hts_os.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 hfile_libcurl.o hfile_gcs.o hfile_s3.o
  # pysam: htslib_config LIBS=-ldeflate -llzma -lbz2 -lz -lm -lcurl -lcrypto
  # pysam: htslib_config PLATFORM=default
  # pysam: config_option: ENABLE_PLUGINS=0
  # pysam: config_option: HAVE_COMMONCRYPTO=0
  # pysam: config_option: HAVE_GMTIME_R=1
  # pysam: config_option: HAVE_HMAC=1
  # pysam: config_option: HAVE_IRODS=0
  # pysam: config_option: HAVE_LIBCURL=1
  # pysam: config_option: HAVE_MMAP=1
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/pysam
  copying pysam/samtools.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/Pileup.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/version.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/config.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/__init__.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/utils.py -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/bcftools.py -> build/lib.linux-x86_64-3.6/pysam
  creating build/lib.linux-x86_64-3.6/pysam/include
  copying pysam/include/__init__.py -> build/lib.linux-x86_64-3.6/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/libcvcf.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcsamtools.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libchtslib.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcbcftools.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcbcf.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcutils.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcsamfile.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libctabix.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcalignedsegment.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcfaidx.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libctabixproxies.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/libcalignmentfile.pxd -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/pysam_util.h -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/htslib_util.h -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/cbcftools_util.h -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/pysam_stream.h -> build/lib.linux-x86_64-3.6/pysam
  copying pysam/csamtools_util.h -> build/lib.linux-x86_64-3.6/pysam
  creating build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bam_plbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/sam_opts.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bam_endian.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/sample.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/sam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/stats_isize.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/sam_header.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bedidx.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/samtools.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bam_lpileup.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/bam2bcf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/tmp_file.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/version.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/samtools.pysam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  copying samtools/config.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
  creating build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/vcfbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/regidx.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/bam_sample.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/kheap.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/mw.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/call.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/khash_str2str.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/bin.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/hclust.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/rbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/vcmp.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/kmin.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/bcftools.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/bcftools.pysam.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/convert.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/HMM.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/prob1.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/tsv2vcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/smpl_ilist.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/ploidy.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/bam2bcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/version.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/filter.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/gvcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  copying bcftools/config.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
  creating build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
  copying samtools/win32/zconf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
  copying samtools/win32/xcurses.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
  copying samtools/win32/zlib.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
  creating build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/textutils_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/hts_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/bcf_sr_sort.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/version.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/hfile_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/thread_pool_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  copying htslib/config.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
  creating build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/regidx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hts_defs.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/thread_pool.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/cram.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hfile.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/vcf.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/kseq.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/sam.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/bgzf.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/ksort.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/kstring.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/faidx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/tbx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hts_log.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/kfunc.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hts_endian.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/khash.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/knetfile.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/kbitset.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/klist.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/vcf_sweep.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/khash_str2int.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hts_os.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/hts.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/synced_bcf_reader.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  copying htslib/htslib/vcfutils.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
  Fixing build/lib.linux-x86_64-3.6/pysam/samtools.py build/lib.linux-x86_64-3.6/pysam/Pileup.py build/lib.linux-x86_64-3.6/pysam/version.py build/lib.linux-x86_64-3.6/pysam/config.py build/lib.linux-x86_64-3.6/pysam/__init__.py build/lib.linux-x86_64-3.6/pysam/utils.py build/lib.linux-x86_64-3.6/pysam/bcftools.py build/lib.linux-x86_64-3.6/pysam/include/__init__.py
  Skipping optional fixer: buffer
  Skipping optional fixer: idioms
  Skipping optional fixer: set_literal
  Skipping optional fixer: ws_comma
  Fixing build/lib.linux-x86_64-3.6/pysam/samtools.py build/lib.linux-x86_64-3.6/pysam/Pileup.py build/lib.linux-x86_64-3.6/pysam/version.py build/lib.linux-x86_64-3.6/pysam/config.py build/lib.linux-x86_64-3.6/pysam/__init__.py build/lib.linux-x86_64-3.6/pysam/utils.py build/lib.linux-x86_64-3.6/pysam/bcftools.py build/lib.linux-x86_64-3.6/pysam/include/__init__.py
  Skipping optional fixer: buffer
  Skipping optional fixer: idioms
  Skipping optional fixer: set_literal
  Skipping optional fixer: ws_comma
  running build_ext
  building 'pysam.libchtslib' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/pysam
  /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ciralab/miniconda3/include -fPIC -I/usr/local/include -I/tmp/pip-build-bkca2rmp/pysam/samtools -I/tmp/pip-build-bkca2rmp/pysam/samtools/lz4 -I/tmp/pip-build-bkca2rmp/pysam/bcftools -I/tmp/pip-build-bkca2rmp/pysam/pysam -I/tmp/pip-build-bkca2rmp/pysam -I/usr/include/python3.6m -c pysam/libchtslib.c -o build/temp.linux-x86_64-3.6/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
  In file included from /usr/include/python3.6m/Python.h:8:0,
                   from pysam/libchtslib.c:4:
  /usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
   #  include <x86_64-linux-gnu/python3.6m/pyconfig.h>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pysam
  Running setup.py clean for pysam
Failed to build pysam
Installing collected packages: pysam
  Running setup.py install for pysam ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bkca2rmp/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-0y6mfzu9-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    # pysam: no cython available - using pre-compiled C
    # pysam: htslib mode is shared
    # pysam: HTSLIB_CONFIGURE_OPTIONS=None
    # pysam: (env) CC=/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc
    # pysam: (env) CFLAGS=-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include
    # pysam: (env) LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/ciralab/miniconda3/lib -Wl,-rpath-link,/home/ciralab/miniconda3/lib -L/home/ciralab/miniconda3/lib
    checking for gcc... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc accepts -g... yes
    checking for /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc option to accept ISO C89... none needed
    checking for ranlib... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-ranlib
    checking for grep that handles long lines and -e... /bin/grep
    checking for C compiler warning flags... -Wall
    checking for special C compiler options needed for large files... no
    checking for _FILE_OFFSET_BITS value needed for large files... no
    checking for _LARGEFILE_SOURCE value needed for large files... no
    checking shared library type for unknown-Linux... plain .so
    checking how to run the C preprocessor... /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cpp
    checking for egrep... /bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for stdlib.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for sys/param.h... yes
    checking for getpagesize... yes
    checking for working mmap... yes
    checking for gmtime_r... yes
    checking for fsync... yes
    checking for drand48... yes
    checking whether fdatasync is declared... yes
    checking for fdatasync... yes
    checking for library containing log... -lm
    checking for zlib.h... yes
    checking for inflate in -lz... yes
    checking for library containing recv... none required
    checking for bzlib.h... yes
    checking for BZ2_bzBuffToBuffCompress in -lbz2... yes
    checking for lzma.h... yes
    checking for lzma_easy_buffer_encode in -llzma... yes
    checking for libdeflate.h... yes
    checking for libdeflate_deflate_compress in -ldeflate... yes
    checking for curl_easy_pause in -lcurl... yes
    checking for CCHmac... no
    checking for library containing HMAC... -lcrypto
    checking whether PTHREAD_MUTEX_RECURSIVE is declared... yes
    configure: creating ./config.status
    config.status: creating config.mk
    config.status: creating htslib.pc.tmp
    config.status: creating config.h
    config.status: config.h is unchanged
    # pysam: htslib configure options: --enable-libcurl
    make: ./version.sh: Command not found
    make: ./version.sh: Command not found
    # pysam: htslib_config LDFLAGS=-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,-rpath,/home/ciralab/miniconda3/lib -Wl,-rpath-link,/home/ciralab/miniconda3/lib -L/home/ciralab/miniconda3/lib
    # 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 hts_os.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 hfile_libcurl.o hfile_gcs.o hfile_s3.o
    # pysam: htslib_config LIBS=-ldeflate -llzma -lbz2 -lz -lm -lcurl -lcrypto
    # pysam: htslib_config PLATFORM=default
    # pysam: config_option: ENABLE_PLUGINS=0
    # pysam: config_option: HAVE_COMMONCRYPTO=0
    # pysam: config_option: HAVE_GMTIME_R=1
    # pysam: config_option: HAVE_HMAC=1
    # pysam: config_option: HAVE_IRODS=0
    # pysam: config_option: HAVE_LIBCURL=1
    # pysam: config_option: HAVE_MMAP=1
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pysam
    copying pysam/samtools.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/Pileup.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/version.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/config.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/__init__.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/utils.py -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/bcftools.py -> build/lib.linux-x86_64-3.6/pysam
    creating build/lib.linux-x86_64-3.6/pysam/include
    copying pysam/include/__init__.py -> build/lib.linux-x86_64-3.6/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/libcvcf.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcsamtools.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libchtslib.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcbcftools.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcbcf.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcutils.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcsamfile.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libctabix.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcalignedsegment.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcfaidx.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libctabixproxies.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/libcalignmentfile.pxd -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/pysam_util.h -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/htslib_util.h -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/cbcftools_util.h -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/pysam_stream.h -> build/lib.linux-x86_64-3.6/pysam
    copying pysam/csamtools_util.h -> build/lib.linux-x86_64-3.6/pysam
    creating build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bam_plbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/sam_opts.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bam_endian.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/sample.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/sam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/stats_isize.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/sam_header.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bedidx.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/samtools.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bam_lpileup.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/bam2bcf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/tmp_file.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/version.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/samtools.pysam.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    copying samtools/config.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools
    creating build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/vcfbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/regidx.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/bam_sample.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/kheap.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/mw.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/call.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/khash_str2str.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/bin.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/hclust.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/rbuf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/vcmp.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/kmin.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/bcftools.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/bcftools.pysam.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/convert.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/HMM.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/prob1.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/tsv2vcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/smpl_ilist.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/ploidy.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/bam2bcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/version.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/filter.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/gvcf.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    copying bcftools/config.h -> build/lib.linux-x86_64-3.6/pysam/include/bcftools
    creating build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
    copying samtools/win32/zconf.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
    copying samtools/win32/xcurses.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
    copying samtools/win32/zlib.h -> build/lib.linux-x86_64-3.6/pysam/include/samtools/win32
    creating build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/textutils_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/hts_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/bcf_sr_sort.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/version.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/hfile_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/thread_pool_internal.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    copying htslib/config.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib
    creating build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/regidx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hts_defs.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/thread_pool.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/cram.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hfile.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/vcf.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/kseq.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/sam.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/bgzf.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/ksort.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/kstring.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/faidx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/tbx.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hts_log.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/kfunc.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hts_endian.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/khash.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/knetfile.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/kbitset.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/klist.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/vcf_sweep.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/khash_str2int.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hts_os.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/hts.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/synced_bcf_reader.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    copying htslib/htslib/vcfutils.h -> build/lib.linux-x86_64-3.6/pysam/include/htslib/htslib
    Fixing build/lib.linux-x86_64-3.6/pysam/samtools.py build/lib.linux-x86_64-3.6/pysam/Pileup.py build/lib.linux-x86_64-3.6/pysam/version.py build/lib.linux-x86_64-3.6/pysam/config.py build/lib.linux-x86_64-3.6/pysam/__init__.py build/lib.linux-x86_64-3.6/pysam/utils.py build/lib.linux-x86_64-3.6/pysam/bcftools.py build/lib.linux-x86_64-3.6/pysam/include/__init__.py
    Skipping optional fixer: buffer
    Skipping optional fixer: idioms
    Skipping optional fixer: set_literal
    Skipping optional fixer: ws_comma
    Fixing build/lib.linux-x86_64-3.6/pysam/samtools.py build/lib.linux-x86_64-3.6/pysam/Pileup.py build/lib.linux-x86_64-3.6/pysam/version.py build/lib.linux-x86_64-3.6/pysam/config.py build/lib.linux-x86_64-3.6/pysam/__init__.py build/lib.linux-x86_64-3.6/pysam/utils.py build/lib.linux-x86_64-3.6/pysam/bcftools.py build/lib.linux-x86_64-3.6/pysam/include/__init__.py
    Skipping optional fixer: buffer
    Skipping optional fixer: idioms
    Skipping optional fixer: set_literal
    Skipping optional fixer: ws_comma
    running build_ext
    building 'pysam.libchtslib' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/pysam
    /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ciralab/miniconda3/include -fPIC -I/usr/local/include -I/tmp/pip-build-bkca2rmp/pysam/samtools -I/tmp/pip-build-bkca2rmp/pysam/samtools/lz4 -I/tmp/pip-build-bkca2rmp/pysam/bcftools -I/tmp/pip-build-bkca2rmp/pysam/pysam -I/tmp/pip-build-bkca2rmp/pysam -I/usr/include/python3.6m -c pysam/libchtslib.c -o build/temp.linux-x86_64-3.6/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
    In file included from /usr/include/python3.6m/Python.h:8:0,
                     from pysam/libchtslib.c:4:
    /usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
     #  include <x86_64-linux-gnu/python3.6m/pyconfig.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command '/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-bkca2rmp/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-0y6mfzu9-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-bkca2rmp/pysam/

Marcel Martin

unread,
Dec 8, 2019, 9:27:27 AM12/8/19
to pysam-us...@googlegroups.com
Hi,

On 2019-12-08 10:25, Adarsh Singh wrote:
>   /usr/include/python3.6m/pyconfig.h:3:12: fatal error:
> x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
>      #  include <x86_64-linux-gnu/python3.6m/pyconfig.h>
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     compilation terminated.
>     error: command
> '/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed
> with exit status 1

it appears that you’re using a Conda-installed compiler, but system-wide
include files. I believe if you want to use 'pip install' from within
Conda, you need to make sure that the pip that you are using is a
Conda-installed one. So 'conda install pip' might fix the problem.

However, this might not be the only problem. Since you appear to be
using Conda already, I would suggest instead that you just use 'conda
install pysam' to get pysam. (You need to add the Bioconda channel first
if you haven’t done so. See
<https://bioconda.github.io/user/install.html#set-up-channels>.)

Regards,
Marcel


Adarsh Singh

unread,
Dec 8, 2019, 10:56:52 AM12/8/19
to Pysam User group
Thank you Marcel for getting back to me, but the problem seems to persist; Posting the error:

$ pip3 install pysam


Collecting pysam

Building wheels for collected packages: pysam
  Running setup.py bdist_wheel for pysam ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-axoiwf2n/pysam/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmp4ybm7wuypip-wheel- --python-tag cp36:
  /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ciralab/miniconda3/include -fPIC -I/usr/local/include -I/tmp/pip-build-axoiwf2n/pysam/samtools -I/tmp/pip-build-axoiwf2n/pysam/samtools/lz4 -I/tmp/pip-build-axoiwf2n/pysam/bcftools -I/tmp/pip-build-axoiwf2n/pysam/pysam -I/tmp/pip-build-axoiwf2n/pysam -I/usr/include/python3.6m -c pysam/libchtslib.c -o build/temp.linux-x86_64-3.6/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
  In file included from /usr/include/python3.6m/Python.h:8:0,
                   from pysam/libchtslib.c:4:
  /usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
   #  include <x86_64-linux-gnu/python3.6m/pyconfig.h>
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  compilation terminated.
  error: command '/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for pysam
  Running setup.py clean for pysam
Failed to build pysam
Installing collected packages: pysam
  Running setup.py install for pysam ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-axoiwf2n/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-s67ycrfw-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    /home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc -DNDEBUG -g -fwrapv -O2 -Wall -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/ciralab/miniconda3/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/ciralab/miniconda3/include -fPIC -I/usr/local/include -I/tmp/pip-build-axoiwf2n/pysam/samtools -I/tmp/pip-build-axoiwf2n/pysam/samtools/lz4 -I/tmp/pip-build-axoiwf2n/pysam/bcftools -I/tmp/pip-build-axoiwf2n/pysam/pysam -I/tmp/pip-build-axoiwf2n/pysam -I/usr/include/python3.6m -c pysam/libchtslib.c -o build/temp.linux-x86_64-3.6/pysam/libchtslib.o -Wno-unused -Wno-strict-prototypes -Wno-sign-compare -Wno-error=declaration-after-statement
    In file included from /usr/include/python3.6m/Python.h:8:0,
                     from pysam/libchtslib.c:4:
    /usr/include/python3.6m/pyconfig.h:3:12: fatal error: x86_64-linux-gnu/python3.6m/pyconfig.h: No such file or directory
     #  include <x86_64-linux-gnu/python3.6m/pyconfig.h>
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command '/home/ciralab/miniconda3/bin/x86_64-conda_cos6-linux-gnu-cc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-axoiwf2n/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-s67ycrfw-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-axoiwf2n/pysam/

Reply all
Reply to author
Forward
0 new messages