-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
astropy.io: ImportError: No module named _bz2 #5967
Copy link
Copy link
Closed
Labels
Description
Hello, I am using Debian 8.7 and I got the following import error while importing fits from the astropy.io (astropy Version: 1.3.2).
from astropy.io import fits
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/io/fits/__init__.py", line 70, in <module>
from . import convenience
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/io/fits/convenience.py", line 64, in <module>
from .file import FILE_MODES, _File
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/io/fits/file.py", line 5, in <module>
import bz2
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python/bz2.py", line 20, in <module>
from _bz2 import BZ2Compressor, BZ2Decompressor
ImportError: No module named _bz2Similarly, astropy.test() gives me the following errors.
>>> astropy.test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/utils/decorators.py", line 874, in test
func = make_function_with_signature(func, name=name, **wrapped_args)
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/tests/runner.py", line 224, in test
return runner.run_tests(**kwargs)
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/tests/runner.py", line 516, in run_tests
from ..table import Table # pylint: disable=W0611
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/table/__init__.py", line 59, in <module>
from ..io.fits import connect
File "/gbdata/ScienceTools-v10r0p5-fssc-20150518-/x86_64-unknown-linux-gnu-libc2.19-10/lib/python2.7/site-packages/astropy/io/fits/__init__.py", line 16, in <module>
from . import py3compat
ImportError: cannot import name py3compatAny help will be highly appreciated.
Reactions are currently unavailable