9

I had older version of python pre-installed on Ubuntu. I recently installed new python3.4 version without removing the older one. In python3 I am not able to see the command history. Searching around, I found that readline module is responsible for the command history and it is missing in python3. So I installed it using

sudo apt-get install libreadline6-dev

It gets installed without any error but python3 still has no readline module. How do I install it to get command history in python3.

Mahesh
  • 155
  • 1
  • 3
  • 11
  • 3
    That's for building from source. You could also get 3.4 from the [deadsnakes ppa](https://launchpad.net/~fkrull/+archive/deadsnakes). – Eryk Sun Apr 09 '14 at 23:25

1 Answers1

11

I was experiencing the same problem and found my fix here.

sudo apt-get install libncurses5-dev
sudo -H pip3 install readline

I'm not sure how universal the answer is though, you might need more packages (for example the libreadline6-dev package you mentioned) before you could install readline with pip3

β.εηοιτ.βε
  • 33,893
  • 13
  • 69
  • 83
lingxiao
  • 1,214
  • 17
  • 33