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 opt #95

Open
lybird300 opened this issue Nov 13, 2018 · 3 comments
Open

ImportError: No module named opt #95

lybird300 opened this issue Nov 13, 2018 · 3 comments

Comments

@lybird300
Copy link

lybird300 commented Nov 13, 2018

Hi there,

My python verion is 2.7.11. I installed pysamstats from github master directly after installing pysam-0.15.1.

I got the following error. What do you think might be the problem and how should I fix it? Thank you for your time.

import pysam
import pysamstats
Traceback (most recent call last):
File "", line 1, in
File "pysamstats/init.py", line 8, in
from .pileup import *
File "pysamstats/pileup.py", line 6, in
import pysamstats.opt as opt
ImportError: No module named 'pysamstats.opt'

Best,
Yuan

@alimanfoo
Copy link
Owner

alimanfoo commented Nov 13, 2018 via email

@lybird300
Copy link
Author

Hi Alistair, thank you for your prompt reply. I followed the third installation option, i.e.,

$ git clone git://github.com/alimanfoo/pysamstats.git
$ cd pysamstats
$ python setup.py install

Not sure if that matters, but I did the above in a python virtual environment

Thanks!
Yuan

@lybird300
Copy link
Author

I did get some warnings though (attached below)

[1/1] Cythonizing pysamstats/opt.pyx
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /lustre1/gaog_pkuhpc/build/pysamstats/pysamstats/opt.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
running install
running bdist_egg
running egg_info
writing pysamstats.egg-info/PKG-INFO
writing top-level names to pysamstats.egg-info/top_level.txt
writing dependency_links to pysamstats.egg-info/dependency_links.txt
reading manifest file 'pysamstats.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*.pxd' under directory 'pysamstats'
writing manifest file 'pysamstats.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building 'pysamstats.opt' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam -I/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib -I/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/samtools -I/apps/bioinfo/python2.7.11/include/python2.7 -c pysamstats/opt.c -o build/temp.linux-x86_64-2.7/pysamstats/opt.o
In file included from /lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/hts.h:35:0,
from /lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/sam.h:31,
from /lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/htslib_util.h:4,
from pysamstats/opt.c:648:
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/hts_log.h:52:6: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
enum htsLogLevel hts_get_log_level();
^
In file included from /lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/pysam_stream.h:4:0,
from pysamstats/opt.c:658:
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:178:16: warning: ‘kseq_init’ defined but not used [-Wunused-function]
SCOPE kseq_t *kseq_init(type_t fd)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:249:2: note: in expansion of macro ‘__KSEQ_BASIC’
__KSEQ_BASIC(SCOPE, type_t)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:252:35: note: in expansion of macro ‘KSEQ_INIT2’
#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/pysam_stream.h:9:1: note: in expansion of macro ‘KSEQ_INIT’
KSEQ_INIT(BGZF *, bgzf_read)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:184:13: warning: ‘kseq_destroy’ defined but not used [-Wunused-function]
SCOPE void kseq_destroy(kseq_t *ks)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:249:2: note: in expansion of macro ‘__KSEQ_BASIC’
__KSEQ_BASIC(SCOPE, type_t)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:252:35: note: in expansion of macro ‘KSEQ_INIT2’
#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/pysam_stream.h:9:1: note: in expansion of macro ‘KSEQ_INIT’
KSEQ_INIT(BGZF *, bgzf_read)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:198:12: warning: ‘kseq_read’ defined but not used [-Wunused-function]
SCOPE int kseq_read(kseq_t *seq)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:250:2: note: in expansion of macro ‘__KSEQ_READ’
__KSEQ_READ(SCOPE)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/include/htslib/htslib/kseq.h:252:35: note: in expansion of macro ‘KSEQ_INIT2’
#define KSEQ_INIT(type_t, __read) KSEQ_INIT2(static, type_t, __read)
^
/lustre1/gaog_pkuhpc/users/liny/rnaseq/pythonEnv/lib/python2.7/site-packages/pysam/pysam_stream.h:9:1: note: in expansion of macro ‘KSEQ_INIT’
KSEQ_INIT(BGZF *, bgzf_read)
^
gcc -pthread -shared build/temp.linux-x86_64-2.7/pysamstats/opt.o -o build/lib.linux-x86_64-2.7/pysamstats/opt.so

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

2 participants