limix / bgen-reader-py

A BGEN file format reader.
MIT License
10 stars 3 forks source link

'bgen_reader._ffi' not found #9

Closed seafloor closed 6 years ago

seafloor commented 6 years ago

Hi,

I'm having an issue just importing read_bgen, where a "ModuleNotFoundError: No module named 'bgen_reader._ffi'" error is returned. I'm getting this on both my mac and linux, but I have an older installation on a different mac that works really well.

Output from loading in ipython is pasted below. Any help would be really appreciated!

Running python 3.6.2, ipython 6.1.0

In [1]: from bgen_reader import read_bgen
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-0d4fe5d6d0d4> in <module>()
----> 1 from bgen_reader import read_bgen

~/.conda/envs/py3-ml/lib/python3.6/site-packages/bgen_reader/__init__.py in <module>()
     10 from __future__ import absolute_import as _
     11 
---> 12 from .bgen_reader import convert_to_dosage, read_bgen, create_metadata_file
     13 from .testit import test
     14 

~/.conda/envs/py3-ml/lib/python3.6/site-packages/bgen_reader/bgen_reader.py in <module>()
      2 from multiprocessing import cpu_count
      3 from multiprocessing.pool import ThreadPool
----> 4 from ._misc import (make_sure_bytes, create_string,
      5                     check_file_exist, check_file_readable)
      6 

~/.conda/envs/py3-ml/lib/python3.6/site-packages/bgen_reader/_misc.py in <module>()
      3 import sys
      4 import os
----> 5 from ._ffi import ffi
      6 from os.path import exists
      7 

ModuleNotFoundError: No module named 'bgen_reader._ffi'
horta commented 6 years ago

Hi @seafloor , the compilation failed when you installed that package. How did you install it? Could you uninstall and try to install again? And if something fail in the installation, please, report here.

seafloor commented 6 years ago

Thanks @horta for replying - it's working now!

Bgen and bgen-reader were just installed with conda and pip, and cffi with pip too. I never got any output giving errors with pip -v, but re-installing cffi with bitbucket/python setup.py install then bgen-reader solved it on both mac and linux.

Thanks!