Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot easy_install readline for Python 2.7.3 on Mac Os Lion

I am trying to install the python readline module. I have already installed readline via homebrew. If I type

easy_install readline

I get

Downloading http://pypi.python.org/packages/source/r/readline/readline-6.2.2.tar.gz#md5=ad9d4a5a3af37d31daf36ea917b08c77
Processing readline-6.2.2.tar.gz
Writing /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/setup.cfg
Running readline-6.2.2/setup.py -q bdist_egg --dist-dir /var/folders/44/dhrdb5sx53s243j4w03063vh0000gn/T/easy_install-64FbG8/readline-6.2.2/egg-dist-tmp-NOmStB
clang: error: no such file or directory: 'readline/libreadline.a'
clang: error: no such file or directory: 'readline/libhistory.a'
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1

Any ideas about how I could fix this ?

Thanks

like image 229
user11170 Avatar asked Jun 07 '12 04:06

user11170


2 Answers

There is a new solution to this problem in Pypi, pip install gnureadline.

https://pypi.python.org/pypi/gnureadline

The root issue is libedit (BSD-licensed) vs. Gnu Readline (GPL-licensed) . Apple would rather provide incompatible BSD code, than provide compatible code that has GPL restrictions.

like image 173
robbyt Avatar answered Sep 28 '22 12:09

robbyt


This bug should be fixed in readline version 6.2.4 released last week.

Also note that you do not need to install the readline library itself via homebrew. It is already included within the python readline module.

Anyone having problems with the python-readline module is welcome to open an issue on the GitHub page of the module. This will ensure that the problem is permanently solved for everyone.

like image 23
llude Avatar answered Sep 28 '22 12:09

llude