cyvcf2
cyvcf2 copied to clipboard
can't install cyvcf2 using pip
Hi,
I created a Conda environment with python 3.7. I tried to install cuvcf2 as follows pip install cyvcf2
it did not work. error log:
gcc -pthread -B MY_HOME/conda_dir/envs/cyvcf-test/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -Ihtslib -Icyvcf2 -IMY_HOME/conda_dir/envs/cyvcf-test/lib/python3.7/site-packages/numpy/core/include -IMY_HOME/conda_dir/envs/cyvcf-test/include/python3.7m -c htslib/cram/cram_io.c -o build/temp.linux-x86_64-3.7/htslib/cram/cram_io.o -Wno-sign-compare -Wno-unused-function -Wno-strict-prototypes -Wno-unused-result -Wno-discarded-qualifiers
htslib/cram/cram_io.c:53:19: error: bzlib.h: No such file or directory
htslib/cram/cram_io.c:57:18: error: lzma.h: No such file or directory
htslib/cram/cram_io.c: In function ‘lzma_mem_deflate’:
htslib/cram/cram_io.c:722: warning: implicit declaration of function ‘lzma_stream_buffer_bound’
htslib/cram/cram_io.c:728: error: ‘LZMA_OK’ undeclared (first use in this function)
htslib/cram/cram_io.c:728: error: (Each undeclared identifier is reported only once
htslib/cram/cram_io.c:728: error: for each function it appears in.)
htslib/cram/cram_io.c:728: warning: implicit declaration of function ‘lzma_easy_buffer_encode’
htslib/cram/cram_io.c:728: error: ‘LZMA_CHECK_CRC32’ undeclared (first use in this function)
htslib/cram/cram_io.c: In function ‘lzma_mem_inflate’:
htslib/cram/cram_io.c:738: error: ‘lzma_stream’ undeclared (first use in this function)
htslib/cram/cram_io.c:738: error: expected ‘;’ before ‘strm’
htslib/cram/cram_io.c:744: error: ‘LZMA_OK’ undeclared (first use in this function)
htslib/cram/cram_io.c:744: warning: implicit declaration of function ‘lzma_stream_decoder’
htslib/cram/cram_io.c:744: error: ‘strm’ undeclared (first use in this function)
htslib/cram/cram_io.c:744: warning: implicit declaration of function ‘lzma_easy_decoder_memusage’
htslib/cram/cram_io.c:762: warning: implicit declaration of function ‘lzma_code’
htslib/cram/cram_io.c:762: error: ‘LZMA_RUN’ undeclared (first use in this function)
htslib/cram/cram_io.c:763: error: ‘LZMA_STREAM_END’ undeclared (first use in this function)
htslib/cram/cram_io.c:775: error: ‘LZMA_FINISH’ undeclared (first use in this function)
htslib/cram/cram_io.c:786: warning: implicit declaration of function ‘lzma_end’
htslib/cram/cram_io.c: In function ‘cram_uncompress_block’:
htslib/cram/cram_io.c:1025: error: ‘BZ_OK’ undeclared (first use in this function)
htslib/cram/cram_io.c:1025: warning: implicit declaration of function ‘BZ2_bzBuffToBuffDecompress’
htslib/cram/cram_io.c: In function ‘cram_compress_by_method’:
htslib/cram/cram_io.c:1105: error: ‘BZ_OK’ undeclared (first use in this function)
htslib/cram/cram_io.c:1105: warning: implicit declaration of function ‘BZ2_bzBuffToBuffCompress’
At top level:
cc1: warning: unrecognized command line option "-Wno-discarded-qualifiers"
cc1: warning: unrecognized command line option "-Wno-unused-result"
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: MY_HOME/conda_dir/envs/cyvcf-test/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-avuhvi2w/cyvcf2_051d54e5606842b7a2a77f5e62a7e255/setup.py'"'"'; __file__='"'"'/tmp/pip-install-avuhvi2w/cyvcf2_051d54e5606842b7a2a77f5e62a7e255/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-mti4gson/install-record.txt --single-version-externally-managed --compile --install-headers MY_HOME/conda_dir/envs/cyvcf-test/include/python3.7m/cyvcf2 Check the logs for full command output.
Thanks, Medhat
Hi Medhat, since you are using conda, is it possible for you to install cyvcf2 via bioconda?
@ccwang002 Thank you for reaching back. Currently, I'm developing a tool that implicitly uses Cyvcf2. So, I would like to use pip to install all dependencies. Then, I can easily package it. I would appreciate if you have a solution.
Best, Medhat
Works fine for me. Is this a conda issue?
Close, can't reproduce
Still close?
I use pip install cyvcf2==0.20.0 and use cyvcf2-0.20.0.tar,gz and local install,but both methods are failed and have many errors when installing. But I have to use cyvcf2 0.20.0 to finish my work. Is there anyone install it on python3.8 or python3.10 successfully? Is there anyone meet this problem and solve it?
Please post your errors. I'm having trouble installing in a test container too... (works fine with pip on my regular laptop in a .venv): Python 3.10.12, cyvcf2-0.30.22, install-1.3.5
@empathy-c as I mentioned in another issue, you won't be able to use python 3.10 with version 0.20.0, you'll need an older python version.
I got v0.22.0 working on 3.8 here: https://github.com/brentp/cyvcf2/pull/283
k, plz close as resolved.
On Thu, 5 Oct 2023 at 10:36, Brent Pedersen @.***> wrote:
@empathy-c https://github.com/empathy-c as I mentioned in another issue, you won't be able to use python 3.10 with version 0.20.0, you'll need an older python version.
— Reply to this email directly, view it on GitHub https://github.com/brentp/cyvcf2/issues/220#issuecomment-1748490299, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANKSZTUHNME4TMEO3QQJ53TX5Z5SZAVCNFSM5CPAZWW2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZUHA2DSMBSHE4Q . You are receiving this because you commented.Message ID: @.***>