installation - On Centos Linux, how to install Python package 'readline' using pip? -


using regular command sudo pip install readline got error

command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-ax57qh/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-krvgg7-record/install-record.txt --single-version-externally-managed --compile" failed error code 1 in /tmp/pip-build-ax57qh/readline 

the complete console output is

sudo pip install readline [sudo] password qazwsx: collecting readline   using cached readline-6.2.4.1.tar.gz installing collected packages: readline   running setup.py install readline     complete output command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-ax57qh/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-krvgg7-record/install-record.txt --single-version-externally-managed --compile:     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     patching file vi_mode.c     patching file callback.c     patching file support/shobj-conf     patching file patchlevel     patching file input.c     patching file patchlevel     patching file vi_mode.c     patching file patchlevel     checking build system type... x86_64-unknown-linux-gnu     checking host system type... x86_64-unknown-linux-gnu      beginning configuration readline-6.2 x86_64-unknown-linux-gnu      checking whether make sets $(make)... yes     checking gcc... gcc     checking c compiler default output file name... a.out     checking whether c compiler works... yes     checking whether cross compiling... no     checking suffix of executables...     checking suffix of object files... o     checking whether using gnu c compiler... yes     checking whether gcc accepts -g... yes     checking gcc option accept iso c89... none needed     checking how run c preprocessor... gcc -e     checking grep handles long lines , -e... /usr/bin/grep     checking egrep... /usr/bin/grep -e     checking ansi c header files... yes     checking sys/types.h... yes     checking sys/stat.h... yes     checking stdlib.h... yes     checking string.h... yes     checking memory.h... yes     checking strings.h... yes     checking inttypes.h... yes     checking stdint.h... yes     checking unistd.h... yes     checking minix/config.h usability... no     checking minix/config.h presence... no     checking minix/config.h... no     checking whether safe define __extensions__... yes     checking whether gcc needs -traditional... no     checking bsd-compatible install... /usr/bin/install -c     checking ar... ar     checking ranlib... ranlib     checking ansi c-conforming const... yes     checking function prototypes... yes     checking whether char unsigned... no     checking working volatile... yes     checking return type of signal handlers... void     checking size_t... yes     checking ssize_t... yes     checking ansi c header files... (cached) yes     checking whether stat file-mode macros broken... no     checking dirent.h defines dir... yes     checking library containing opendir... none required     checking fcntl... yes     checking kill... yes     checking lstat... yes     checking memmove... yes     checking putenv... yes     checking select... yes     checking setenv... yes     checking setlocale... yes     checking strcasecmp... yes     checking strpbrk... yes     checking tcgetattr... yes     checking vsnprintf... yes     checking isascii... yes     checking isxdigit... yes     checking getpwent... yes     checking getpwnam... yes     checking getpwuid... yes     checking working strcoll... yes     checking fcntl.h usability... yes     checking fcntl.h presence... yes     checking fcntl.h... yes     checking unistd.h... (cached) yes     checking stdlib.h... (cached) yes     checking varargs.h usability... no     checking varargs.h presence... no     checking varargs.h... no     checking stdarg.h usability... yes     checking stdarg.h presence... yes     checking stdarg.h... yes     checking string.h... (cached) yes     checking strings.h... (cached) yes     checking limits.h usability... yes     checking limits.h presence... yes     checking limits.h... yes     checking locale.h usability... yes     checking locale.h presence... yes     checking locale.h... yes     checking pwd.h usability... yes     checking pwd.h presence... yes     checking pwd.h... yes     checking memory.h... (cached) yes     checking termcap.h usability... no     checking termcap.h presence... no     checking termcap.h... no     checking termios.h usability... yes     checking termios.h presence... yes     checking termios.h... yes     checking termio.h usability... yes     checking termio.h presence... yes     checking termio.h... yes     checking sys/pte.h usability... no     checking sys/pte.h presence... no     checking sys/pte.h... no     checking sys/stream.h usability... no     checking sys/stream.h presence... no     checking sys/stream.h... no     checking sys/select.h usability... yes     checking sys/select.h presence... yes     checking sys/select.h... yes     checking sys/file.h usability... yes     checking sys/file.h presence... yes     checking sys/file.h... yes     checking sys/ptem.h... no     checking special c compiler options needed large files... no     checking _file_offset_bits value needed large files... no     checking type of signal functions... posix     checking if signal handlers must reinstalled when invoked... no     checking presence of posix-style sigsetjmp/siglongjmp... present     checking lstat... yes     checking whether or not strcoll , strcmp differ... no     checking whether ctype macros accept non-ascii characters... yes     checking whether getpw functions declared in pwd.h... yes     checking whether termios.h defines tiocgwinsz... no     checking whether sys/ioctl.h defines tiocgwinsz... yes     checking sig_atomic_t in signal.h... yes     checking whether signal handlers of type void... yes     checking tiocstat in sys/ioctl.h... no     checking fionread in sys/ioctl.h... yes     checking speed_t in sys/types.h... no     checking struct winsize in sys/ioctl.h , termios.h... sys/ioctl.h     checking struct dirent.d_ino... yes     checking struct dirent.d_fileno... yes     checking tgetent... no     checking tgetent in -ltermcap... no     checking tgetent in -ltinfo... no     checking tgetent in -lcurses... no     checking tgetent in -lncurses... no     checking library has termcap functions... using gnutermcap     checking wctype.h usability... yes     checking wctype.h presence... yes     checking wctype.h... yes     checking wchar.h usability... yes     checking wchar.h presence... yes     checking wchar.h... yes     checking langinfo.h usability... yes     checking langinfo.h presence... yes     checking langinfo.h... yes     checking mbrlen... yes     checking mbscasecmp... no     checking mbscmp... no     checking mbsnrtowcs... yes     checking mbsrtowcs... yes     checking mbschr... no     checking wcrtomb... yes     checking wcscoll... yes     checking wcsdup... yes     checking wcwidth... yes     checking wctype... yes     checking wcswidth... yes     checking whether mbrtowc , mbstate_t declared... yes     checking iswlower... yes     checking iswupper... yes     checking towlower... yes     checking towupper... yes     checking iswctype... yes     checking nl_langinfo , codeset... yes     checking wchar_t in wchar.h... yes     checking wctype_t in wctype.h... yes     checking wint_t in wctype.h... yes     checking configuration building shared libraries... supported     configure: creating ./config.status     config.status: creating makefile     config.status: creating doc/makefile     config.status: creating examples/makefile     config.status: creating shlib/makefile     config.status: creating config.h     config.status: executing default commands     rm -f readline.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o readline.c     rm -f vi_mode.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o vi_mode.c     rm -f funmap.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o funmap.c     rm -f keymaps.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o keymaps.c     rm -f parens.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o parens.c     rm -f search.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o search.c     rm -f rltty.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o rltty.c     rm -f complete.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o complete.c     rm -f bind.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o bind.c     rm -f isearch.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o isearch.c     rm -f display.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o display.c     rm -f signals.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o signals.c     rm -f util.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o util.c     rm -f kill.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o kill.c     rm -f undo.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o undo.c     rm -f macro.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o macro.c     rm -f input.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o input.c     rm -f callback.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o callback.c     rm -f terminal.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o terminal.c     rm -f text.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o text.c     rm -f nls.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o nls.c     rm -f misc.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o misc.c     rm -f compat.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o compat.c     rm -f xfree.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o xfree.c     rm -f xmalloc.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o xmalloc.c     rm -f history.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o history.c     rm -f histexpand.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o histexpand.c     rm -f histfile.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o histfile.c     rm -f histsearch.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o histsearch.c     rm -f shell.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o shell.c     rm -f mbutil.o     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o mbutil.c     rm -f tilde.o     gcc -dhave_config_h   -dneed_extern_pc -fpic -i. -i. -drl_library_version='"6.2"' -g -o -dreadline_library -c ./tilde.c     rm -f libreadline.a     ar cr libreadline.a readline.o vi_mode.o funmap.o keymaps.o parens.o search.o rltty.o complete.o bind.o isearch.o display.o signals.o util.o kill.o undo.o macro.o input.o callback.o terminal.o text.o nls.o misc.o compat.o xfree.o xmalloc.o history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o tilde.o     test -n "ranlib" && ranlib libreadline.a     rm -f libhistory.a     ar cr libhistory.a history.o histexpand.o histfile.o histsearch.o shell.o mbutil.o xmalloc.o xfree.o     test -n "ranlib" && ranlib libhistory.a     test -d shlib || mkdir shlib     ( cd shlib ; make  )     make[1]: entering directory `/tmp/pip-build-ax57qh/readline/rl/readline-lib/shlib'     rm -f readline.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o readline.o ../readline.c     mv readline.o readline.so     rm -f vi_mode.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o vi_mode.o ../vi_mode.c     mv vi_mode.o vi_mode.so     rm -f funmap.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o funmap.o ../funmap.c     mv funmap.o funmap.so     rm -f keymaps.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o keymaps.o ../keymaps.c     mv keymaps.o keymaps.so     rm -f parens.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o parens.o ../parens.c     mv parens.o parens.so     rm -f search.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o search.o ../search.c     mv search.o search.so     rm -f rltty.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o rltty.o ../rltty.c     mv rltty.o rltty.so     rm -f complete.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o complete.o ../complete.c     mv complete.o complete.so     rm -f bind.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o bind.o ../bind.c     mv bind.o bind.so     rm -f isearch.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o isearch.o ../isearch.c     mv isearch.o isearch.so     rm -f display.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o display.o ../display.c     mv display.o display.so     rm -f signals.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o signals.o ../signals.c     mv signals.o signals.so     rm -f util.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o util.o ../util.c     mv util.o util.so     rm -f kill.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o kill.o ../kill.c     mv kill.o kill.so     rm -f undo.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o undo.o ../undo.c     mv undo.o undo.so     rm -f macro.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o macro.o ../macro.c     mv macro.o macro.so     rm -f input.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o input.o ../input.c     mv input.o input.so     rm -f callback.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o callback.o ../callback.c     mv callback.o callback.so     rm -f terminal.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o terminal.o ../terminal.c     mv terminal.o terminal.so     rm -f text.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o text.o ../text.c     mv text.o text.so     rm -f nls.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o nls.o ../nls.c     mv nls.o nls.so     rm -f misc.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o misc.o ../misc.c     mv misc.o misc.so     rm -f xmalloc.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o xmalloc.o ../xmalloc.c     mv xmalloc.o xmalloc.so     rm -f xfree.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o xfree.o ../xfree.c     mv xfree.o xfree.so     rm -f history.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o history.o ../history.c     mv history.o history.so     rm -f histexpand.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o histexpand.o ../histexpand.c     mv histexpand.o histexpand.so     rm -f histfile.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o histfile.o ../histfile.c     mv histfile.o histfile.so     rm -f histsearch.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o histsearch.o ../histsearch.c     mv histsearch.o histsearch.so     rm -f shell.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o shell.o ../shell.c     mv shell.o shell.so     rm -f mbutil.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o mbutil.o ../mbutil.c     mv mbutil.o mbutil.so     rm -f tilde.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -dreadline_library -c -o tilde.o ../tilde.c     mv tilde.o tilde.so     rm -f compat.so     gcc -c -dhave_config_h   -dneed_extern_pc -fpic -i. -i.. -i.. -drl_library_version='"6.2"' -g -o -fpic -o compat.o ../compat.c     mv compat.o compat.so     rm -f libreadline.so.6.2     gcc -shared -wl,-soname,libreadline.so.6.2 -l./lib/termcap -wl,-rpath,/usr/local/lib -wl,-soname,`basename libreadline.so.6.2 .2` -o libreadline.so.6.2 readline.so vi_mode.so funmap.so keymaps.so parens.so search.so rltty.so complete.so bind.so isearch.so display.so signals.so util.so kill.so undo.so macro.so input.so callback.so terminal.so text.so nls.so misc.so xmalloc.so xfree.so history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so tilde.so compat.so     rm -f libhistory.so.6.2     gcc -shared -wl,-soname,libhistory.so.6.2 -l./lib/termcap -wl,-rpath,/usr/local/lib -wl,-soname,`basename libhistory.so.6.2 .2` -o libhistory.so.6.2 history.so histexpand.so histfile.so histsearch.so shell.so mbutil.so xmalloc.so xfree.so     make[1]: leaving directory `/tmp/pip-build-ax57qh/readline/rl/readline-lib/shlib'      ============ building readline library ============       ============ building 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 -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -dndebug -o2 -g -pipe -wall -wp,-d_fortify_source=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -d_gnu_source -fpic -fwrapv -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/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     modules/2.x/readline.c:8:20: fatal error: python.h: no such file or directory      #include "python.h"                         ^     compilation terminated.     error: command 'gcc' failed exit status 1      ---------------------------------------- command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-ax57qh/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-krvgg7-record/install-record.txt --single-version-externally-managed --compile" failed error code 1 in /tmp/pip-build-ax57qh/readline 

update: adding path $cpath not help

-bash-4.2$ locate python.h /usr/include/python2.7/python.h -bash-4.2$ echo $cpath  -bash-4.2$ export cpath=/usr/include/python2.7/ -bash-4.2$ echo $cpath /usr/include/python2.7/ 

and still same error running sudo pip install readline:

command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-np1wus/readline/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-9uamrv-record/install-record.txt --single-version-externally-managed --compile" failed error code 1 in /tmp/pip-build-np1wus/readline 

then said file no longer exist in tmp/:

-bash-4.2$ ls -la /tmp/pip-build-* ls: cannot access /tmp/pip-build-*: no such file or directory 

don't know sure but:

try installing sudo yum install python-devel

edit: can check if directory /usr/include/python2.7 exists? looks gcc can't find libraries python.


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -