我的Mac最近更新了,我注意到Python中缺少了readline功能。我试图重新安装它,却得到了一个神秘的错误,我无法解码。我已经卸载并重新安装了XCode,现在不知所措。
安装很简单:pip install readline
并且(部分)错误是:
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
1条答案
按热度按时间hgqdbh6s1#
对我来说,答案是重新安装一个名为ncurses的软件包,它已经损坏了。希望这能帮助其他人。