Reputation: 155
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.
Upvotes: 9
Views: 15129
Reputation: 1224
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
Upvotes: 11