Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

readline does not install [mac]

My Mac updated recently and I noticed that readline functionality was missing in Python. I tried to reinstall it and got a cryptic error, which I cannot decode. I have already uninstalled and reinstalled XCode, and am at a loss.

The installation is a simple: pip install readline

and (part of) the error is:

 Beginning configuration for readline-6.2 for i386-apple-darwin20.6.0
      
      checking whether make sets $(MAKE)... yes
      checking for gcc... gcc
      checking for C compiler default output file name...
      configure: error: in `/private/var/folders/gv/vxf1pd9x3mxc320ld73kkjfw0000gp/T/pip-install-eih2gt76/readline_fb5900c159cc42958f966f55a49321bf/rl/readline-lib':
      configure: error: C compiler cannot create executables
      See `config.log' for more details.

...

      5 warnings generated.
      creating build/lib.macosx-10.9-x86_64-cpython-38
      gcc -bundle -undefined dynamic_lookup -L/Users/david/opt/miniconda3/lib -L/Users/david/opt/miniconda3/lib build/temp.macosx-10.9-x86_64-cpython-38/Modules/3.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.macosx-10.9-x86_64-cpython-38/readline.cpython-38-darwin.so -arch i386 -arch x86_64
      clang: error: no such file or directory: 'readline/libreadline.a'
      clang: error: no such file or directory: 'readline/libhistory.a'
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> readline
like image 381
David Inman Avatar asked Dec 06 '25 07:12

David Inman


1 Answers

I ended up installing gnureadline instead. See here for more details: https://pypi.org/project/readline/.

like image 57
malana Avatar answered Dec 08 '25 21:12

malana



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!