Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35273 > unrolled thread
| Started by | "Isml" <76069016@qq.com> |
|---|---|
| First post | 2012-12-21 14:27 +0800 |
| Last post | 2012-12-22 07:28 -0800 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.lang.python
compile python 3.3 with bz2 support "Isml" <76069016@qq.com> - 2012-12-21 14:27 +0800
Re: compile python 3.3 with bz2 support Miki Tebeka <miki.tebeka@gmail.com> - 2012-12-22 07:28 -0800
Re: compile python 3.3 with bz2 support Miki Tebeka <miki.tebeka@gmail.com> - 2012-12-22 07:28 -0800
| From | "Isml" <76069016@qq.com> |
|---|---|
| Date | 2012-12-21 14:27 +0800 |
| Subject | compile python 3.3 with bz2 support |
| Message-ID | <mailman.1139.1356071349.29569.python-list@python.org> |
[Multipart message — attachments visible in raw view] — view raw
hi, everyone:
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:
1. download bzip2 and compile it(make、make -f Makefile_libbz2_so、make install)
2.chang to python 3.3 source directory : ./configure --with-bz2=/usr/local/include
3. make
4. make install
after installation complete, I test it:
[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'
By the way, RedHat 5.5 has a built-in python 2.4.3. Would it be a problem?
[toc] | [next] | [standalone]
| From | Miki Tebeka <miki.tebeka@gmail.com> |
|---|---|
| Date | 2012-12-22 07:28 -0800 |
| Message-ID | <59b55c80-ed42-4b5b-aab7-55047c99178e@googlegroups.com> |
| In reply to | #35273 |
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.5 but 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.
[toc] | [prev] | [next] | [standalone]
| From | Miki Tebeka <miki.tebeka@gmail.com> |
|---|---|
| Date | 2012-12-22 07:28 -0800 |
| Message-ID | <mailman.1204.1356190114.29569.python-list@python.org> |
| In reply to | #35273 |
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.5 but 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.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web