Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'importerror:': 0.05; 'python3': 0.05; '21,': 0.07; 'linker': 0.07; 'problem?': 0.07; 'skip:/ 10': 0.07; 'python': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:python': 0.11; '"import': 0.16; 'bz2': 0.16; 'doing:': 0.16; 'echo': 0.16; 'from:addr:miki.tebeka': 0.16; 'from:name:miki tebeka': 0.16; 'subject:3.3': 0.16; 'wrote:': 0.17; 'systems.': 0.18; 'module': 0.19; 'skip:" 30': 0.20; 'import': 0.21; '"",': 0.22; 'subject:support': 0.22; 'work,': 0.22; 'cc:2**0': 0.23; 'so.': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:[ 10': 0.26; '(most': 0.27; 'install': 0.29; 'that.': 0.30; 'thursday,': 0.30; 'december': 0.32; 'problem.': 0.32; 'file': 0.32; 'traceback': 0.33; 'that,': 0.34; 'version': 0.34; "can't": 0.34; 'received:google.com': 0.34; 'built-in': 0.35; 'fail': 0.35; 'skip:l 30': 0.35; 'received:209.85': 0.35; 'add': 0.36; 'but': 0.36; 'subject:with': 0.36; 'why': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'think': 0.40; 'here': 0.65; '20,': 0.65; '8bit%:21': 0.69 Newsgroups: comp.lang.python Date: Sat, 22 Dec 2012 07:28:23 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.82.8.111; posting-account=uo-8fwoAAACKsFzFX78JHudx1V7WDXZ0 References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 75.82.8.111 MIME-Version: 1.0 Subject: Re: compile python 3.3 with bz2 support From: Miki Tebeka To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1356190114 news.xs4all.nl 6896 [2001:888:2000:d::a6]:43582 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:35373 On Thursday, December 20, 2012 10:27:54 PM UTC-8, Isml wrote: > =C2=A0 =C2=A0 I want to compile python 3.3 with bz2 support on RedHat 5.5= but fail to do that. Here is how I do it: > =C2=A0 =C2=A0 1. download bzip2 and compile it(make=E3=80=81make -f Makef= ile_libbz2_so=E3=80=81make install) Why can't you use yum? (yum install libbz2-dev) > =C2=A0 =C2=A0 [root@localhost Python-3.3.0]# python3 -c "import bz2" > Traceback (most recent call last): > =C2=A0 File "", line 1, in > =C2=A0 File "/usr/local/lib/python3.3/bz2.py", line 21, in > =C2=A0 =C2=A0 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=3D/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.