Unable to 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 print

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 on how I can fix this?

thanks

+4
source share
6 answers

Try installing the binary egg directly:

 $ easy_install http://pypi.python.org/packages/2.7/r/readline/readline-6.2.2-py2.7-macosx-10.7-intel.egg#md5=25383d860632d4a1521961ba68a52fe2 
0
source

In Pypi, pip install gnureadline has a new solution to this problem.

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

The root problem is libedit (BSD license) and Gnu Readline (GPL license). Apple would rather provide incompatible BSD code than provide compatible code with GPL restrictions.

+10
source

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

Also note that you do not need to install the readline library directly through homebrew. It is already included in the readline python module.

Anyone who has problems with the python-readline module can open the problem on the module’s GitHub page . This ensures that the problem is finally resolved for everyone.

+4
source

I had the same problem in OS X Lion 10.8 and fixed it by renaming my / Developer to / Developer-old. See this problem .

+2
source

None of the above worked for me. After uninstalling ipython and readline, I ran the following, which finally worked

 easy_install http://pypi.python.org/packages/source/r/readline/readline-6.1.0.tar.gz pip install ipython 

And yes, readline 6.1.0 is old, but 6.2.x or otherwise will not work (in September 2013).

+1
source

Make sure you have gcc installed.

 which gcc 

must return

 /usr/bin/gcc 

When I tried easy_install readline, I got the same error. Only when I loaded tar and tried to manually create it did I notice what it said

 checking whether make sets $(MAKE)... no checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/Users/roneill/readline-6.2.4.1/rl/readline-lib': configure: error: no acceptable C compiler found in $PATH See `config.log' for more details. 

that I understood what the real problem was. I did not use this particular laptop and did not use Xcode to install command line tools. As soon as I did this, everything worked correctly.

0
source

Source: https://habr.com/ru/post/1416504/


All Articles