Python import error no module named bz2
Question: I have libbz2-dev installed however I am still getting the following import
error while importing gensim :

    
    
    >>> import gensim
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/krishna/gensimenv/lib/python2.7/site-packages/gensim/__init__.py", line 6, in <module>
        from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
      File "/home/krishna/gensimenv/lib/python2.7/site-packages/gensim/corpora/__init__.py", line 14, in <module>
        from .wikicorpus import WikiCorpus
      File "/home/krishna/gensimenv/lib/python2.7/site-packages/gensim/corpora/wikicorpus.py", line 21, in <module>
        import bz2
    ImportError: No module named bz2
    


Answer: you can try to do

    
    
    pip install bz2file
    

