Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: No module named _snappy_cffi #46

Open
snashraf opened this issue Jul 16, 2018 · 16 comments
Open

ImportError: No module named _snappy_cffi #46

snashraf opened this issue Jul 16, 2018 · 16 comments

Comments

@snashraf
Copy link

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
Copy link

sormond commented Jul 18, 2018

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
Copy link

wibom commented Nov 23, 2018

I have the same issue...

@wibom
Copy link

wibom commented Nov 23, 2018

I have the same issue...

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

@aurelBZH
Copy link

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
Copy link
Author

snashraf commented Jan 29, 2019 via email

@jeffverboon
Copy link

Any fixes for this??

@brentp
Copy link
Member

brentp commented Feb 27, 2019

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
Copy link

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
Copy link

udp3f commented Apr 19, 2019

Same issue here Brent. Is there a solution?

@brentp
Copy link
Member

brentp commented Apr 19, 2019

can you install snappy from conda-forge?

@udp3f
Copy link

udp3f commented Apr 19, 2019

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?

intake/python-snappy#69

@brentp
Copy link
Member

brentp commented Apr 20, 2019

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

@udp3f
Copy link

udp3f commented Apr 20, 2019

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

@udp3f
Copy link

udp3f commented Apr 20, 2019

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
Copy link
Member

brentp commented Apr 20, 2019

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

@udp3f
Copy link

udp3f commented Apr 20, 2019

Thanks! That seems to work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants