Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install the module bz2 on python v2.7. I'm using Ubuntu 12.04 LTS and I have already installed libbz2-dev through Synaptic.

I read that I need to rebuild python to take the changes of libbz2-dev (file headers). But I know that the process is dangerous on Ubuntu since the OS uses python.

Do you have a process to install bz2 or to recompile python safely ?



share|improve this question
when I launch Python from usr/bin I can import bz2 module, but I launch python from default command line I cannot. I think it's a Path problem –  user259122 Mar 17 '14 at 13:50
Could you add results of ls -l `which python` to the question. –  Sneetsher Mar 19 '14 at 21:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.