Error installing gnureadline via pip

Question:

I broke my IPython setup whilst trying to upgrade to IPython 2.0. The installation fails when gnureadline is being installed. I originally had this problem but I fixed it. Now I’m getting this error:

cc -bundle -undefined dynamic_lookup -arch x86_64 -arch i386 -Wl,-F. -Qunused-arguments -Qunused-arguments build/temp.macosx-10.9-intel-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.macosx-10.9-intel-2.7/gnureadline.so

clang: error: no such file or directory: 'readline/libreadline.a'

clang: error: no such file or directory: 'readline/libhistory.a'

error: command 'cc' failed with exit status 1

----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools;__file__='/private/var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip_build_root/gnureadline/setup.py';exec(compile(open(__file__).read().replace('rn', 'n'), __file__, 'exec'))" install --record /var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip-iJITYv-record/install-record.txt --single-version-externally-managed failed with error code 1 in /private/var/folders/jj/0w0dd3n16jq4g5579g6c7h040000gn/T/pip_build_root/gnureadline
Storing complete log in /Users/mc/Library/Logs/pip.log

Thanks for any help.

Asked By: mchangun

||

Answers:

sudo apt-get install libncurses5-dev

Reference:
Ipython no readline available and pip install readline error

Answered By: Nabarun Chatterjee

In addition to the above. The libffi package sorted it out for me.

sudo apt-get install libncurses5-dev libffi-dev
Answered By: user1725997

install in terminal sudo apt-get install libncurses5-dev, it is working fine and then pip install gnureadline==6.3.3

Answered By: Aditya Rajak

For Fedora users:

dnf install ncurses-devel
Answered By: batisteo

On OSX 10.14.5 –

brew install ncurses

then

pip install gnureadline
Answered By: andorov
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.