Bruno
Bruno

Reputation: 189

bz2 issue when installing Python 2.6.6 on Cent OS 5.8

I installed bzip2, bzip2-devel & bzip2-libs using the following command:

yum install bzip2 bzip2-devel bzip2-libs

Installation proceeded with to warning or error.

After this step, I installed Python 2.6.6 using the following commands (note: I must install it this way and not using yum):

wget http://www.python.org/ftp/python/2.6.6/Python-2.6.6.tgz
tar -xzvf Python-2.6.6.tgz
cd Python-2.6.6
./configure
make
make install

But on "make" step, I got the following error:

Failed to build these modules: bz2

I tried installing Mercurial 2.0.2 afterward but got the following error:

Couldn't import standard bz2 (incomplete Python install).

Anyone knows what I'm doing wrong here?

Thx

Upvotes: 3

Views: 3900

Answers (2)

Khanchi97
Khanchi97

Reputation: 133

Make sure you don't have mixed installation of Python. In my case, I had two installations

/usr/local/bin/python and /usr/bin/python where by default it was using first one.

So I did: rm /usr/bin/python and it worked.

Or

You can also change the priority of which python in your $PATH.

Upvotes: 0

Bruno
Bruno

Reputation: 189

I managed to fix my problem by adding --enable-shared option when configuring Python.

./configure --enable-shared

Upvotes: 3

Related Questions