quinlan-lab / vcf2db

create a gemini-compatible database from a VCF
MIT License
55 stars 13 forks source link

ImportError: No module named _snappy_cffi #46

Open snashraf opened 5 years ago

snashraf commented 5 years ago

Hi All,

$ python vcf2db.py --help Traceback (most recent call last): File "vcf2db.py", line 12, in import snappy File "/gpfs/home/nsyed/bcbio/anaconda/envs/vcf2db/lib/python2.7/site-packages/snappy/init.py", line 3, in from .snappy import ( File "/gpfs/home/nsyed/bcbio/anaconda/envs/vcf2db/lib/python2.7/site-packages/snappy/snappy.py", line 51, in from .snappy_cffi import UncompressError, compress, decompress, \ File "/gpfs/home/nsyed/bcbio/anaconda/envs/vcf2db/lib/python2.7/site-packages/snappy/snappy_cffi.py", line 3, in from ._snappy_cffi import ffi, lib ImportError: No module named _snappy_cffi

I made a seperate env for vcf2db but still getiing the same error. Any idea what could be reason for this.

Thanks Najeeb

sormond commented 5 years ago

Hi,

I am also having this issue.

I have tried working in another environment also. Python3 is able to import snappy but not python2.

I have python installed through anaconda.

Thanks Shannon

wibom commented 5 years ago

I have the same issue...

wibom commented 5 years ago

I have the same issue...

A workaround appears to be to grab snappy from conda-forge...

aurelBZH commented 5 years ago

hi, I tried inside or outside of a docker container in python 2 and 3 and every time i have this problem. Is there a workaround ?

snashraf commented 5 years ago

I installed bcbio-nextgen from bcbio and then I can use vcf2db after loading bcbio-nextgen module.

On Tue, Jan 29, 2019 at 1:37 PM Aurélien Béliard notifications@github.com wrote:

hi, I tried inside or outside of a docker container in python 2 and 3 and every time i have this problem. Is there a workaround ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/quinlan-lab/vcf2db/issues/46#issuecomment-458491589, or mute the thread https://github.com/notifications/unsubscribe-auth/AEJUN9GhxqJJLd6njcsMoH0x20o1UUUkks5vICR6gaJpZM4VRHg1 .

-- Syed Najeeb Ashraf

jeffverboon commented 5 years ago

Any fixes for this??

brentp commented 5 years ago

did you run the commands in the readme?

conda install -y gcc snappy # install the C library for snappy
conda install -c conda-forge python-snappy 
jeffverboon commented 5 years ago

Yeah. 1) installed miniconda 2) made conda environment/activated 3) ran the following commands: git clone https://github.com/quinlan-lab/vcf2db cd vcf2db conda install -y gcc snappy # install the C library for snappy conda install -c conda-forge python-snappy conda install -c bioconda cyvcf2 peddy pip install -r requirements.txt

I tried making the environment both python 3.7 and 2.7, same error

udp3f commented 5 years ago

Same issue here Brent. Is there a solution?

brentp commented 5 years ago

can you install snappy from conda-forge?

udp3f commented 5 years ago

I did install. I did conda install -y gcc snappy # install the C library for snappy conda install -c conda-forge python-snappy conda install -c bioconda cyvcf2 peddy pip install -r requirements.txt

and also conda install -c conda-forge snappy Everything seemed to go smooth but while running vcf2db an import error for _snappy_cffi happened, similar to post 1. Has this got anything to do with the below issue?

https://github.com/andrix/python-snappy/issues/69

brentp commented 5 years ago

I mean: conda install -c conda-forge snappy instead of conda install snappy

udp3f commented 5 years ago

Yes brent! This is what I have run "conda install -c conda-forge snappy"

udp3f commented 5 years ago

I redid everything on a different server, this time using the gemini executables, gemini_conda and gemini_pip and also "gemini_conda install -c conda-forge snappy". I did not have the above mentioned error anymore while running vcf2db but this time I have a new one for the gene impacts module - "AttributeError: 'module' object has no attribute 'BCFT'"

brentp commented 5 years ago

the BCFT error is because you have an old version of geneimpacts. If you update that it should go away.

udp3f commented 5 years ago

Thanks! That seems to work now.