Re: compile python 3.3 with bz2 support

Discussion in 'Python' started by Miki Tebeka, Dec 22, 2012.

  1. Miki Tebeka

    Miki Tebeka Guest

    On Thursday, December 20, 2012 10:27:54 PM UTC-8, Isml wrote:
    >     I want to compile python 3.3 with bz2 support on RedHat 5.5but fail to do that. Here is how I do it:
    >     1. download bzip2 and compile it(makeã€make -f Makefile_libbz2_soã€make install)

    Why can't you use yum? (yum install libbz2-dev)

    >     [root@localhost Python-3.3.0]# python3 -c "import bz2"
    > Traceback (most recent call last):
    >   File "<string>", line 1, in <module>
    >   File "/usr/local/lib/python3.3/bz2.py", line 21, in <module>
    >     from _bz2 import BZ2Compressor, BZ2Decompressor
    > ImportError: No module named '_bz2'

    IMO it's a linker problem. If libbz2.zo is in /usr/local/lib then try
    LB_LIBRARY_PATH=/usr/local/lib python3 -c 'import bz2'

    If this work, you can add /usr/local/lib to the linker by doing:
    echo /usr/local/lib >> /etc/ld.so.conf.d/local.conf
    ldconfig

    Having said that, if the yum way work - do it.


    > By the way, RedHat 5.5 has a built-in python 2.4.3. Would it be a problem?

    I don't think so. I have multiple version of Python on RedHat systems.
    Miki Tebeka, Dec 22, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Magdoll
    Replies:
    3
    Views:
    361
    Steven D'Aprano
    Jun 5, 2010
  2. patrickwayodi
    Replies:
    6
    Views:
    899
    Anssi Saari
    Dec 14, 2011
  3. Ramchandra Apte
    Replies:
    0
    Views:
    218
    Ramchandra Apte
    Dec 21, 2012
  4. Chris Angelico
    Replies:
    0
    Views:
    128
    Chris Angelico
    Dec 21, 2012
  5. Benjamin Kaplan

    Re: compile python 3.3 with bz2 support

    Benjamin Kaplan, Dec 22, 2012, in forum: Python
    Replies:
    0
    Views:
    156
    Benjamin Kaplan
    Dec 22, 2012
Loading...

Share This Page