Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: compile python 3.3 with bz2 support

Reply
Thread Tools

Re: compile python 3.3 with bz2 support

 
 
Miki Tebeka
Guest
Posts: n/a
 
      12-22-2012
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: compile python 3.3 with bz2 support Benjamin Kaplan Python 0 12-22-2012 04:06 PM
Re: compile python 3.3 with bz2 support on RedHat 5.5 Chris Angelico Python 0 12-21-2012 02:07 PM
Re: compile python 3.3 with bz2 support on RedHat 5.5 Ramchandra Apte Python 0 12-21-2012 12:15 PM
bz2 module doesn't work properly with all bz2 files Magdoll Python 3 06-05-2010 02:06 AM



Advertisments