python 安装readline 报错:gcc: error: readline/libreadline.a: No such file or directory

[root@localhost Python-3.6.4]# pip3.6 install readline

creating build/lib.linux-x86_64-3.6
gcc -pthread -shared build/temp.linux-x86_64-3.6/Modules/3.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-3.6/readline.cpython-36m-x86_64-linux-gnu.so
gcc: error: readline/libreadline.a: No such file or directory
gcc: error: readline/libhistory.a: No such file or directory
error: command 'gcc' failed with exit status 1

解决办法:
[root@localhost Python-3.6.4]# yum -y install patch readline-devel

[root@localhost Python-3.6.4]# pip3.6 install readline
Collecting readline
Using cached https://files.pythonhosted.org/packages/f4/01/2cf081af8d880b44939a5f1b446551a7f8d59eae414277fd0c303757ff1b/readline-6.2.4.1.tar.gz
Installing collected packages: readline
Running setup.py install for readline … done
Successfully installed readline-6.2.4.1
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the ‘pip install –upgrade pip’ command.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值