27

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('\r\n', '\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.

Community
  • 1
  • 1
mchangun
  • 9,814
  • 18
  • 71
  • 101

5 Answers5

71

sudo apt-get install libncurses5-dev

Reference: Ipython no readline available and pip install readline error

Community
  • 1
  • 1
Nabarun Chatterjee
  • 1,084
  • 14
  • 17
  • 1
    install in terminal `sudo apt-get install libncurses5-dev`, it is working fine and then `pip install gnureadline==6.3.3` – Tarek Kalaji Feb 26 '15 at 15:46
8

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

sudo apt-get install libncurses5-dev libffi-dev
3

On OSX 10.14.5 -

brew install ncurses

then

pip install gnureadline
andorov
  • 4,197
  • 3
  • 39
  • 52
0

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

Aditya Rajak
  • 43
  • 1
  • 9
0

For Fedora users:

dnf install ncurses-devel
batisteo
  • 453
  • 1
  • 4
  • 10