4

I am using a python 3.6 virtual environment and am having problems with the readline package. The system readline version is 8.0, while the pip package is

$ pip list | grep readline
gnureadline         6.3.8 

This leads to trouble importing / using, i.e.:

Python 3.6.7 (default, Dec  7 2018, 08:11:04) 
[GCC 8.2.1 20180831] on linux
Type "help", "copyright", "credits" or "license" for more information.
Module readline not available.
>>> import readline
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: libreadline.so.7: cannot open shared object file: No such file or directory

Since it's missing the .so, I tried downloading and building readline 7.0 from here, and adding the directory with the .so to the path via

export LD_LIBRARY_PATH=/path/to/built/libreadline.so.7

With no effect, though. Any ideas?

npit
  • 2,219
  • 2
  • 19
  • 25

1 Answers1

4

I figured it out -- it seems that I can just make a symlink using the new version of readline, by:

sudo ln -s /usr/lib/libreadline.so.8.0 /usr/lib/libreadline.so.7
npit
  • 2,219
  • 2
  • 19
  • 25