Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8665187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:25:19+00:00 2026-06-12T17:25:19+00:00

I have installed at my home directory. [spatel@~ dev1]$ /home/spatel/python-2.7.3/bin/python -V Python 2.7.3 I

  • 0

I have installed at my home directory.

[spatel@~ dev1]$ /home/spatel/python-2.7.3/bin/python -V
Python 2.7.3

I am trying to run one script which required python 2.7.x version, and i am getting missing bz2 error

[spatel@~ dev1]$ ./import_logs.py
Traceback (most recent call last):
  File "./import_logs.py", line 13, in <module>
    import bz2
ImportError: No module named bz2

I have tried to install bz2 module but i got lots of error

 [spatel@dev1 python-bz2-1.1]$ /home/spatel/python-2.7.3/bin/python setup.py install
    ...
    ...
    ...
    bz2.c:1765: error: âBZ_FINISH_OKâ undeclared (first use in this function)
    bz2.c:1765: warning: comparison between pointer and integer
    bz2.c:1771: error: âPyMemberDefâ has no member named âavail_outâ
    bz2.c:1778: error: âPyMemberDefâ has no member named ânext_outâ
    bz2.c:1778: error: âPyMemberDefâ has no member named âtotal_out_hi32â
    bz2.c:1778: error: âPyMemberDefâ has no member named âtotal_out_lo32â
    bz2.c:1778: error: invalid operands to binary +
    bz2.c:1778: warning: statement with no effect
    bz2.c:1779: error: âPyMemberDefâ has no member named âavail_outâ
    bz2.c:1779: error: âPyMemberDefâ has no member named ânext_outâ
    bz2.c:1779: error: invalid operands to binary -
    bz2.c:1779: error: invalid operands to binary -
    bz2.c:1779: warning: statement with no effect
    bz2.c:1783: error: âPyMemberDefâ has no member named âavail_outâ
    bz2.c:1784: error: âPyMemberDefâ has no member named âtotal_out_hi32â
    bz2.c:1784: error: âPyMemberDefâ has no member named âtotal_out_lo32â
    bz2.c:1784: warning: passing argument 2 of â_PyString_Resizeâ makes integer from pointer without a cast
    error: command 'gcc' failed with exit status 1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:25:21+00:00Added an answer on June 12, 2026 at 5:25 pm

    Probably as you built python from source, you don’t have bz2 headers.

    Install them on Ubuntu/Debian:

    sudo apt-get install libbz2-dev
    

    Fedora:

    sudo yum install bzip2-devel 
    

    And build python again.
    You may notice that python checks for lots of libraries when configuring/building, if you miss some of them you probably will get no support for libs like bz2 on your case.

    You should get prebuild binaries to avoid this kind of stuff. Ubuntu 12.04 packs python 2.7.3, the version your script needs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a gem installed in my home directory on a laptop (eg not
I have installed my own copy of Perl in my home directory, but I
I'm attempting to install Weka, which I have installed into /weka directory. I set
I have two python installation. One is installed in default location and other is
We have installed RHQ monitoring system http://rhq-project.org/display/RHQ/Home . From that time our program started
I have installed a servlet (solr) that requires that I set the variable solr.solr.home
So, I have installed the pypy pre-built interpreter to my home folder in windows;
O/S: Windows 7 ,Home Premium I have just installed IIS manager Express from Web
I have an iPhone WebApp that is installed to the home page. When a
I'm on Ubuntu 11.10 , have installed Monodevelop-2.8.5 , on the first run, it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.