文档章节

pip 安装其他工具报错处理

东方封夜
 东方封夜
发布于 2016/05/11 10:48
字数 950
阅读 365
收藏 0

码上生花,ECharts 作品展示赛正式启动!>>>

今天在linux 上用下python 写东西,在python解释器中用回退键和上下左右键的时候报错。。。

然后想到readline插件,于是用pip install readline安装插件,结果报错了,信息如下:

[root@localhost ~]# pip install readline
Collecting readline
  Using cached readline-6.2.4.1.tar.gz
Installing collected packages: readline
  Running setup.py install for readline ... error
    Complete output from command /usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yaN9Fr/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LArwHg-record/install-record.txt --single-version-externally-managed --compile:
    
    ============ Building the readline library ============
    
    readline-6.2/
    readline-6.2/doc/
    readline-6.2/doc/Makefile.in
    readline-6.2/doc/texinfo.tex
    readline-6.2/doc/version.texi
    readline-6.2/doc/fdl.texi
    readline-6.2/doc/rlman.texi
    readline-6.2/doc/rltech.texi
    readline-6.2/doc/rluser.texi
    readline-6.2/doc/rluserman.texi
    readline-6.2/doc/history.texi
    readline-6.2/doc/hstech.texi
    readline-6.2/doc/hsuser.texi
    readline-6.2/doc/readline.3
    readline-6.2/doc/history.3
    readline-6.2/doc/texi2dvi
    readline-6.2/doc/texi2html
    readline-6.2/doc/readline.ps
    readline-6.2/doc/history.ps
    readline-6.2/doc/rluserman.ps
    readline-6.2/doc/readline.dvi
    readline-6.2/doc/history.dvi
    readline-6.2/doc/rluserman.dvi
    readline-6.2/doc/readline.info
    readline-6.2/doc/history.info
    readline-6.2/doc/rluserman.info
    readline-6.2/doc/readline.html
    readline-6.2/doc/history.html
    readline-6.2/doc/rluserman.html
    readline-6.2/doc/readline.0
    readline-6.2/doc/history.0
    readline-6.2/doc/readline_3.ps
    readline-6.2/doc/history_3.ps
    readline-6.2/doc/history.pdf
    readline-6.2/doc/readline.pdf
    readline-6.2/doc/rluserman.pdf
    readline-6.2/examples/
    readline-6.2/examples/autoconf/
    readline-6.2/examples/autoconf/BASH_CHECK_LIB_TERMCAP
    readline-6.2/examples/autoconf/RL_LIB_READLINE_VERSION
    readline-6.2/examples/autoconf/wi_LIB_READLINE
    readline-6.2/examples/rlfe/
    readline-6.2/examples/rlfe/ChangeLog
    readline-6.2/examples/rlfe/Makefile.in
    readline-6.2/examples/rlfe/README
    readline-6.2/examples/rlfe/config.h.in
    readline-6.2/examples/rlfe/configure
    readline-6.2/examples/rlfe/configure.in
    readline-6.2/examples/rlfe/extern.h
    readline-6.2/examples/rlfe/os.h
    readline-6.2/examples/rlfe/pty.c
    readline-6.2/examples/rlfe/rlfe.c
    readline-6.2/examples/rlfe/screen.h
    readline-6.2/examples/Makefile.in
    readline-6.2/examples/excallback.c
    readline-6.2/examples/fileman.c
    readline-6.2/examples/manexamp.c
    readline-6.2/examples/readlinebuf.h
    readline-6.2/examples/rl-fgets.c
    readline-6.2/examples/rlcat.c
    readline-6.2/examples/rlevent.c
    readline-6.2/examples/rltest.c
    readline-6.2/examples/rl.c
    readline-6.2/examples/rlptytest.c
    readline-6.2/examples/rlversion.c
    readline-6.2/examples/histexamp.c
    readline-6.2/examples/Inputrc
    readline-6.2/examples/rlwrap-0.30.tar.gz
    readline-6.2/support/
    readline-6.2/support/config.guess
    readline-6.2/support/config.rpath
    readline-6.2/support/config.sub
    readline-6.2/support/install.sh
    readline-6.2/support/mkdirs
    readline-6.2/support/mkdist
    readline-6.2/support/mkinstalldirs
    readline-6.2/support/shobj-conf
    readline-6.2/support/shlib-install
    readline-6.2/support/wcwidth.c
    readline-6.2/shlib/
    readline-6.2/shlib/Makefile.in
    readline-6.2/COPYING
    readline-6.2/README
    readline-6.2/MANIFEST
    readline-6.2/INSTALL
    readline-6.2/CHANGELOG
    readline-6.2/CHANGES
    readline-6.2/NEWS
    readline-6.2/USAGE
    readline-6.2/aclocal.m4
    readline-6.2/config.h.in
    readline-6.2/configure
    readline-6.2/configure.in
    readline-6.2/Makefile.in
    readline-6.2/ansi_stdlib.h
    readline-6.2/chardefs.h
    readline-6.2/history.h
    readline-6.2/histlib.h
    readline-6.2/keymaps.h
    readline-6.2/posixdir.h
    readline-6.2/posixjmp.h
    readline-6.2/readline.h
    readline-6.2/posixselect.h
    readline-6.2/posixstat.h
    readline-6.2/rlconf.h
    readline-6.2/rldefs.h
    readline-6.2/rlmbutil.h
    readline-6.2/rlprivate.h
    readline-6.2/rlshell.h
    readline-6.2/rlstdc.h
    readline-6.2/rltty.h
    readline-6.2/rltypedefs.h
    readline-6.2/rlwinsize.h
    readline-6.2/tcap.h
    readline-6.2/tilde.h
    readline-6.2/xmalloc.h
    readline-6.2/bind.c
    readline-6.2/callback.c
    readline-6.2/compat.c
    readline-6.2/complete.c
    readline-6.2/display.c
    readline-6.2/emacs_keymap.c
    readline-6.2/funmap.c
    readline-6.2/input.c
    readline-6.2/isearch.c
    readline-6.2/keymaps.c
    readline-6.2/kill.c
    readline-6.2/macro.c
    readline-6.2/mbutil.c
    readline-6.2/misc.c
    readline-6.2/nls.c
    readline-6.2/parens.c
    readline-6.2/readline.c
    readline-6.2/rltty.c
    readline-6.2/savestring.c
    readline-6.2/search.c
    readline-6.2/shell.c
    readline-6.2/signals.c
    readline-6.2/terminal.c
    readline-6.2/text.c
    readline-6.2/tilde.c
    readline-6.2/undo.c
    readline-6.2/util.c
    readline-6.2/vi_keymap.c
    readline-6.2/vi_mode.c
    readline-6.2/xfree.c
    readline-6.2/xmalloc.c
    readline-6.2/history.c
    readline-6.2/histexpand.c
    readline-6.2/histfile.c
    readline-6.2/histsearch.c
    readline-6.2/patchlevel
    ./build.sh: line 41: patch: command not found
    
    ============ Building the readline extension module ============
    
    running install
    running build
    running build_ext
    building 'readline' extension
    creating build
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/Modules
    creating build/temp.linux-x86_64-2.7/Modules/2.x
    gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_RL_CALLBACK -DHAVE_RL_CATCH_SIGNAL -DHAVE_RL_COMPLETION_APPEND_CHARACTER -DHAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK -DHAVE_RL_COMPLETION_MATCHES -DHAVE_RL_COMPLETION_SUPPRESS_APPEND -DHAVE_RL_PRE_INPUT_HOOK -I. -I/usr/local/include/python2.7 -c Modules/2.x/readline.c -o build/temp.linux-x86_64-2.7/Modules/2.x/readline.o -Wno-strict-prototypes
    creating build/lib.linux-x86_64-2.7
    gcc -pthread -shared build/temp.linux-x86_64-2.7/Modules/2.x/readline.o readline/libreadline.a readline/libhistory.a -lncurses -o build/lib.linux-x86_64-2.7/readline.so
    gcc: readline/libreadline.a: No such file or directory
    gcc: readline/libhistory.a: No such file or directory
    error: command 'gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/local/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yaN9Fr/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-LArwHg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-yaN9Fr/readline/

 

然后

#yum -y install patch

安装了这个打补丁工具

再用

[root@localhost ~]# pip install readline
Collecting readline
  Using cached 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

OK成功了。。。现在就可以放心的使用上下左右及回退键了。

© 著作权归作者所有

上一篇: 源码安装paramiko
下一篇: python 下载文件
东方封夜
粉丝 1
博文 9
码字总数 4503
作品 0
成都
系统管理员
私信 提问
加载中
请先登录后再评论。
pip安装报错处理+PyPi源切换教程

一、pip安装出错类型 1.1 pip版本过旧导致不能安装 报错提示: You are using pip version 9.0.3, however version 10.0.1 is available.You should consider upgrading via the 'python -m ......

osc_ft59t5i9
2018/06/15
1
0
31、如何安装第三方模块?以及用过哪些第三方模块?

在Python中,安装第三方模块,是通过setuptools这个工具完成的。Python有两个封装了setuptools的包管理工具:easy_install和pip。目前官方推荐使用pip 如果你正在使用Mac或Linux,安装pip本身...

osc_dk3cdlqm
2018/06/19
4
0
个人博客搭建( wordpress )

最近同学买了一台虚机( centos7 系统 )、一个域名,让帮忙搭一个个人博客。本着简单快捷,个人博客采用 wordpress 来搭建。为了以后博客系统的迁移方便,使用 docker 来安装 wordpress。下面...

osc_ju7lpfoo
2019/01/31
14
0
pip install 提示"no previously-included directories found matching"及"no previously-i...

环境描述: Python 2.7.5 CentOS-7.2 报错现象: (1).在虚拟环境下运行 pip install 命令安装 PyPI 第三方库,出现类似如下告警。 Running setup.py egg_info for package Werkzeug no prev...

osc_o18rkfva
2018/02/22
3
0
同一台电脑安装python2&python3

【安装之前,先了解一下概念】   python是什么? Python是一种面向对象的解释型计算机程序设计语言,由荷兰人Guido van Rossum于1989年发明,第一个公开发行版发行于1991年。 Python是纯粹...

osc_ryjlu6z2
2018/07/16
2
0

没有更多内容

加载失败,请刷新页面

加载更多

Mysql按月创建表分区

前言 下面仅记录一次对空表的一次分区过程,以日志表为例。 CREATE TABLE `sys_log` (  `log_id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键ID',  `user_id` int(10) DEFAULT NULL......

osc_7ac8o6u9
22分钟前
7
0
“不好意思,我要开始报复性省钱了”:成年人究竟如何体面地省钱?

最近,“报复性省钱”的行为火了。据数据显示,2020年第一季度人民币存款共增加8.07万亿元左右,也就是说,一季度的91天里,平均每天超过700亿存款涌向银行!本以为疫情结束会迎来一波“报...

osc_5asswvor
22分钟前
3
0
深度强化学习 - Policy Gradient 策略梯度类算法总结(一) - 知乎

Policy Gradient 类的算法是深度强化学习中很重要的一类算法,也是目前最有成效的算法之一。但我在学习的过程中一直觉得这部分的知识点比较散乱,因为策略梯度类的算法包括很多种变体,经过了...

osc_ct0tt1cu
23分钟前
9
0
强化学习基础 Ⅳ: State-of-the-art 强化学习经典算法汇总 - 知乎

封面是OpenAI在 spinning up 中给出的分类,然而这已不足以囊括现有的SOTA算法,再次感慨AI领域发paper的速度。(然而在智能方面好像也没有推进很多,不过不积跬步无以至千里嘛) 为了让大家...

osc_rki151ee
24分钟前
14
0
k8s-ephemeral和init容器

  截止到目前k8s1.18版本,k8s已经支持四种类型的container:标准容器,sidecar容器,init容器,ephemeral容器。 一:ephemeral容器 1.1.什么是ephemeral容器 临时容器与其他容器的不同之处...

osc_id3h8pjd
25分钟前
3
0

没有更多内容

加载失败,请刷新页面

加载更多

返回顶部
顶部