3

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

Bruno
  • 189
  • 1
  • 4
  • 15

2 Answers2

3

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

./configure --enable-shared
Claire
  • 639
  • 9
  • 25
Bruno
  • 189
  • 1
  • 4
  • 15
0

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.

Khanchi97
  • 133
  • 1
  • 8