Giter Club home page Giter Club logo

python-2.7.x-on-centos-5.x's Introduction

Python 2.7.x on CentOS 5.x

Description

Upgrade python (http://www.python.org/) to latest stable version without breaking yum on CentOS 5.x.

It also installs by default pip, virtualenv and fabric, but can be skipped.

This script was tested on:

  • CentOS 5.5 (i686)
  • CentOS 5.6 (i686)
  • CentOS 5.7 (x86_64)
  • CentOS 5.8 (x86_64)

It's idempotent and cleans up after itself on exit or interrupt (^X^C).

Requirements

This script has only been tested on CentOS 5.5, 5.6, 5.7 and 5.8.

Please do NOT run it on CentOS 6.x (it should not be needed).

Usage

You must be root or use sudo.

#> ./install_python27.sh

You can edit dest in install_python27.sh to select destination path for python:

dest="/usr/local"

If you do not wish to install python extras (pip, virtualenv and fabric), please set:

install_extras="false"

Please make sure to add the path your environment, depending on your dest and python version, for example:

export PATH=$PATH:/opt/python2.7.4/bin

Todo

  • allow Python 3 to be installed.

Need Help or Want to Contribute ?

All contributions are welcome: ideas, patches, documentation, bug reports, complaints, and even something you drew up on a napkin.

It is more important to me that you are able to contribute and get help if you need it.

That said, some basic guidelines, which you are free to ignore :)

  • Have a problem you want this script to solve for you ? You can email me personally ([email protected])
  • Have an idea or a feature request? File a ticket on Github, or email me personally ([email protected]) if this is more comfortable.
  • If you think you found a bug, it probably is a bug. Please file a ticket on Github.
  • If you want to make it better, best way is to fork this repo and send me a pull request. If you don't know git, I also accept diff(1) formatted patches - whatever is most comfortable for you.

Programming is not a required skill. Whatever you've seen about open source with maintainers or community members saying "send patches or die" - you will not see that here.

License & Author:

Author:: Anthony Scalisi ([email protected])

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors:

Thanks for helping!

python-2.7.x-on-centos-5.x's People

Contributors

phuslu avatar scalp42 avatar tthayer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

python-2.7.x-on-centos-5.x's Issues

wrong python URL

on the line retrieving python URL:

curl -m 5 --silent www.askcerebro.com/python/python2/url

guess what returned, http://www.python.org/ftp/python/2.7.5/Python-2.7.6.tgz

which will never work.

CentOS 5.11 parsing errors

Seeing errors like:

Resolving {... failed: Name or service not known.



OS (Clean install)
lsb_release -a
LSB Version:    :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch
Distributor ID: CentOS
Description:    CentOS release 5.11 (Final)
Release:        5.11
Codename:       Final


existing Python:
python -V
Python 2.4.3

Result of running as root from/home:
./install_python27.sh

----------------------------------------------------
Installing required packages...
----------------------------------------------------


at.x86_64                                                                        3.1.8-84.el5_11.1                                                               updates
bash.x86_64                                                                      3.2-33.el5_11.4                                                                 updates
net-snmp-libs.x86_64                                                             1:5.3.2.2-25.el5_11                                                             updates
nss.i386                                                                         3.16.1-4.el5_11                                                                 updates
nss.x86_64                                                                       3.16.1-4.el5_11                                                                 updates
nss-tools.x86_64                                                                 3.16.1-4.el5_11                                                                 updates
perl.x86_64                                                                      4:5.8.8-43.el5_11                                                               updates
procmail.x86_64                                                                  3.22-17.1.2.el5_10                                                              updates
rsync.x86_64                                                                     3.0.6-6.el5_11                                                                  updates
stunnel.x86_64                                                                   4.15-2.el5.2                                                                    updates
tzdata.x86_64                                                                    2014i-1.el5                                                                     updates
Package gcc-4.1.2-55.el5.x86_64 already installed and latest version
Package gdbm-devel-1.8.0-28.el5.x86_64 already installed and latest version
Package readline-devel-5.1-3.el5.x86_64 already installed and latest version
Package ncurses-devel-5.5-24.20060715.x86_64 already installed and latest version
Package zlib-devel-1.2.3-7.el5.x86_64 already installed and latest version
Package bzip2-devel-1.0.3-6.el5_5.x86_64 already installed and latest version
Package sqlite-devel-3.3.6-7.x86_64 already installed and latest version
Package db4-devel-4.3.29-10.el5_5.2.x86_64 already installed and latest version
Package openssl-devel-0.9.8e-31.el5_11.x86_64 already installed and latest version
Package tk-devel-8.4.13-5.el5_1.1.x86_64 already installed and latest version
Package bluez-libs-devel-3.7-1.1.x86_64 already installed and latest version
Package 1:make-3.81-3.el5.x86_64 already installed and latest version
Package python-devel-2.4.3-56.el5.x86_64 already installed and latest version
Package wget-1.11.4-3.el5_8.2.x86_64 already installed and latest version
Package curl-7.15.5-17.el5_9.x86_64 already installed and latest version
Package curl-7.15.5-17.el5_9.i386 already installed and latest version
Package unzip-5.52-3.el5.x86_64 already installed and latest version
Package crypto-utils-2.3-2.el5.x86_64 already installed and latest version
Package m2crypto-0.16-9.el5.x86_64 already installed and latest version
Package flex-2.5.4a-41.fc6.x86_64 already installed and latest version
Package gcc-4.1.2-55.el5.x86_64 already installed and latest version
Package redhat-rpm-config-8.0.45-32.el5.centos.noarch already installed and latest version
Package strace-4.5.18-18.el5.x86_64 already installed and latest version
Package rpm-build-4.4.2.3-34.el5.x86_64 already installed and latest version
Package 1:make-3.81-3.el5.x86_64 already installed and latest version
Package 1:pkgconfig-0.21-2.el5.x86_64 already installed and latest version
Package gettext-0.17-1.el5.x86_64 already installed and latest version
Package gettext-0.17-1.el5.i386 already installed and latest version
Package automake-1.9.6-3.el5.noarch already installed and latest version
Package gdb-7.0.1-45.el5.centos.x86_64 already installed and latest version
Package bison-2.3-2.1.x86_64 already installed and latest version
Package libtool-1.5.22-7.el5_4.x86_64 already installed and latest version
Package autoconf-2.59-12.noarch already installed and latest version
Package gcc-c++-4.1.2-55.el5.x86_64 already installed and latest version
Package binutils-2.17.50.0.6-26.el5.x86_64 already installed and latest version
Package ltrace-0.5-20.45svn.el5.x86_64 already installed and latest version
Package diffstat-1.41-1.2.3.el5.x86_64 already installed and latest version
Package splint-3.1.1-16.el5.x86_64 already installed and latest version
Package 1:valgrind-3.5.0-5.el5.x86_64 already installed and latest version
Package 1:valgrind-3.5.0-5.el5.i386 already installed and latest version
Package systemtap-1.8-6.el5.x86_64 already installed and latest version
Package texinfo-4.8-14.el5.x86_64 already installed and latest version
Package automake15-1.5-16.el5.2.noarch already installed and latest version
Package python-ldap-2.2.0-2.1.x86_64 already installed and latest version
Package subversion-1.6.11-12.el5_10.x86_64 already installed and latest version
Package subversion-1.6.11-12.el5_10.i386 already installed and latest version
Package byacc-1.9-29.2.2.x86_64 already installed and latest version
Package gcc-gfortran-4.1.2-55.el5.x86_64 already installed and latest version
Package elfutils-0.137-3.el5.x86_64 already installed and latest version
Package rcs-5.7-30.1.x86_64 already installed and latest version
Package automake16-1.6.3-8.el5.1.noarch already installed and latest version
Package automake17-1.7.9-7.el5.2.noarch already installed and latest version
Package automake14-1.4p6-13.el5.1.noarch already installed and latest version
Package patchutils-0.2.31-2.2.2.x86_64 already installed and latest version
Package ctags-5.6-1.1.x86_64 already installed and latest version
Package dogtail-0.6.1-4.el5.noarch already installed and latest version
Package swig-1.3.29-2.el5.x86_64 already installed and latest version
Package dev86-0.16.17-2.2.x86_64 already installed and latest version
Package 1:doxygen-1.4.7-2.x86_64 already installed and latest version
Package indent-2.2.9-14.fc6.x86_64 already installed and latest version
Package cvs-1.11.22-11.el5_8.1.x86_64 already installed and latest version
Package pstack-1.2-7.2.2.x86_64 already installed and latest version
Package oprofile-0.9.4-20.el5.x86_64 already installed and latest version
Package cscope-15.5-20.el5.x86_64 already installed and latest version

----------------------------------------------------
Downloading sources and compiling...
----------------------------------------------------

--2014-11-07 15:55:09--  http://www.sqlite.org/2013/sqlite-autoconf-3071602.tar.gz
Resolving www.sqlite.org... 67.18.92.124, 2600:3c00::f03c:91ff:fe96:b959
Connecting to www.sqlite.org|67.18.92.124|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1854396 (1.8M) [application/x-gzip]
Saving to: `sqlite-autoconf-3071602.tar.gz'

100%[==============================================================================================================================>] 1,854,396   2.74M/s   in 0.6s

2014-11-07 15:55:10 (2.74 MB/s) - `sqlite-autoconf-3071602.tar.gz' saved [1854396/1854396]

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for ranlib... ranlib
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... gfortran
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether gfortran accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... (cached) ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld -m elf_x86_64
checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gfortran option to produce PIC... -fPIC
checking if gfortran PIC flag -fPIC works... yes
checking if gfortran static flag -static works... yes
checking if gfortran supports -c -o file.o... yes
checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for fdatasync... yes
checking for usleep... yes
checking for fullfsync... no
checking for localtime_r... yes
checking for gmtime_r... yes
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... no
checking for library containing tgetent... -lcurses
checking for library containing readline... -lreadline
checking for readline... yes
checking for library containing pthread_create... -lpthread
checking for library containing dlopen... -ldl
checking for whether to support dynamic extensions... yes
checking for posix_fallocate... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating sqlite3.pc
config.status: executing depfiles commands
if /bin/sh ./libtool --tag=CC --mode=compile gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" -DPACKAGE_STRING=\"sqlite\ 3.7.16.2\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_READLINE=1 -DHAVE_POSIX_FALLOCATE=1 -I. -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF ".deps/sqlite3.Tpo" -c -o sqlite3.lo sqlite3.c; \
        then mv -f ".deps/sqlite3.Tpo" ".deps/sqlite3.Plo"; else rm -f ".deps/sqlite3.Tpo"; exit 1; fi
mkdir .libs
 gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" "-DPACKAGE_STRING=\"sqlite 3.7.16.2\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_READLINE=1 -DHAVE_POSIX_FALLOCATE=1 -I. -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c  -fPIC -DPIC -o .libs/sqlite3.o
 gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" "-DPACKAGE_STRING=\"sqlite 3.7.16.2\"" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_READLINE=1 -DHAVE_POSIX_FALLOCATE=1 -I. -I. -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT sqlite3.lo -MD -MP -MF .deps/sqlite3.Tpo -c sqlite3.c -o sqlite3.o >/dev/null 2>&1
/bin/sh ./libtool --tag=CC --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2   -o libsqlite3.la -rpath /usr/local/lib -no-undefined -version-info 8:6:8 sqlite3.lo  -ldl -lpthread
gcc -shared  .libs/sqlite3.o  -ldl -lpthread  -Wl,-soname -Wl,libsqlite3.so.0 -o .libs/libsqlite3.so.0.8.6
(cd .libs && rm -f libsqlite3.so.0 && ln -s libsqlite3.so.0.8.6 libsqlite3.so.0)
(cd .libs && rm -f libsqlite3.so && ln -s libsqlite3.so.0.8.6 libsqlite3.so)
ar cru .libs/libsqlite3.a  sqlite3.o
ranlib .libs/libsqlite3.a
creating libsqlite3.la
(cd .libs && rm -f libsqlite3.la && ln -s ../libsqlite3.la libsqlite3.la)
if gcc -DPACKAGE_NAME=\"sqlite\" -DPACKAGE_TARNAME=\"sqlite\" -DPACKAGE_VERSION=\"3.7.16.2\" -DPACKAGE_STRING=\"sqlite\ 3.7.16.2\" -DPACKAGE_BUGREPORT=\"http://www.sqlite.org\" -DPACKAGE_URL=\"\" -DPACKAGE=\"sqlite\" -DVERSION=\"3.7.16.2\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FDATASYNC=1 -DHAVE_USLEEP=1 -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 -DHAVE_READLINE=1 -DHAVE_POSIX_FALLOCATE=1 -I. -I.    -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -MT shell.o -MD -MP -MF ".deps/shell.Tpo" -c -o shell.o shell.c; \
        then mv -f ".deps/shell.Tpo" ".deps/shell.Po"; else rm -f ".deps/shell.Tpo"; exit 1; fi
/bin/sh ./libtool --tag=CC --mode=link gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1  -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2   -o sqlite3  shell.o ./libsqlite3.la -lreadline -lcurses  -ldl -lpthread
gcc -D_REENTRANT=1 -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_RTREE -g -O2 -o .libs/sqlite3 shell.o  ./.libs/libsqlite3.so -lreadline -lcurses -ldl -lpthread  -Wl,--rpath -Wl,/usr/local/lib
creating sqlite3
make[1]: Entering directory `/tmp/tmp.QufoC25722/sqlite-autoconf-3071602'
test -z "/usr/local/lib" || mkdir -p -- "/usr/local/lib"
 /bin/sh ./libtool --mode=install /usr/bin/install -c  'libsqlite3.la' '/usr/local/lib/libsqlite3.la'
/usr/bin/install -c .libs/libsqlite3.so.0.8.6 /usr/local/lib/libsqlite3.so.0.8.6
(cd /usr/local/lib && { ln -s -f libsqlite3.so.0.8.6 libsqlite3.so.0 || { rm -f libsqlite3.so.0 && ln -s libsqlite3.so.0.8.6 libsqlite3.so.0; }; })
(cd /usr/local/lib && { ln -s -f libsqlite3.so.0.8.6 libsqlite3.so || { rm -f libsqlite3.so && ln -s libsqlite3.so.0.8.6 libsqlite3.so; }; })
/usr/bin/install -c .libs/libsqlite3.lai /usr/local/lib/libsqlite3.la
/usr/bin/install -c .libs/libsqlite3.a /usr/local/lib/libsqlite3.a
chmod 644 /usr/local/lib/libsqlite3.a
ranlib /usr/local/lib/libsqlite3.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/bin" || mkdir -p -- "/usr/local/bin"
  /bin/sh ./libtool --mode=install /usr/bin/install -c 'sqlite3' '/usr/local/bin/sqlite3'
/usr/bin/install -c .libs/sqlite3 /usr/local/bin/sqlite3
test -z "/usr/local/include" || mkdir -p -- "/usr/local/include"
 /usr/bin/install -c -m 644 'sqlite3.h' '/usr/local/include/sqlite3.h'
 /usr/bin/install -c -m 644 'sqlite3ext.h' '/usr/local/include/sqlite3ext.h'
test -z "/usr/local/share/man/man1" || mkdir -p -- "/usr/local/share/man/man1"
 /usr/bin/install -c -m 644 './sqlite3.1' '/usr/local/share/man/man1/sqlite3.1'
test -z "/usr/local/lib/pkgconfig" || mkdir -p -- "/usr/local/lib/pkgconfig"
 /usr/bin/install -c -m 644 'sqlite3.pc' '/usr/local/lib/pkgconfig/sqlite3.pc'
make[1]: Leaving directory `/tmp/tmp.QufoC25722/sqlite-autoconf-3071602'
--2014-11-07 15:55:58--  http://%7B/
Resolving {... failed: Name or service not known.
wget: unable to resolve host address `{'
--2014-11-07 15:55:58--  ftp://status/ERROR,
           => `ERROR,'
Resolving status... failed: Name or service not known.
wget: unable to resolve host address `status'
--2014-11-07 15:55:58--  ftp://message/Too
           => `Too'
Resolving message... failed: Name or service not known.
wget: unable to resolve host address `message'
--2014-11-07 15:55:58--  http://many/
Resolving many... failed: Name or service not known.
wget: unable to resolve host address `many'
--2014-11-07 15:55:58--  http://requests/
Resolving requests... failed: Name or service not known.
wget: unable to resolve host address `requests'
--2014-11-07 15:55:58--  http://%7D/
Resolving }... failed: Name or service not known.
wget: unable to resolve host address `}'
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target `install'.  Stop.

---------------------------------------------------------------
Installing Pip, Fabric and Virtualenv
---------------------------------------------------------------

--2014-11-07 15:55:59--  http://%7B/
Resolving {... failed: Name or service not known.
wget: unable to resolve host address `{'
--2014-11-07 15:55:59--  ftp://status/ERROR,
           => `ERROR,'
Resolving status... failed: Name or service not known.
wget: unable to resolve host address `status'
--2014-11-07 15:55:59--  ftp://message/Too
           => `Too'
Resolving message... failed: Name or service not known.
wget: unable to resolve host address `message'
--2014-11-07 15:55:59--  http://many/
Resolving many... failed: Name or service not known.
wget: unable to resolve host address `many'
--2014-11-07 15:55:59--  http://requests/
Resolving requests... failed: Name or service not known.
wget: unable to resolve host address `requests'
--2014-11-07 15:55:59--  http://%7D/
Resolving }... failed: Name or service not known.
wget: unable to resolve host address `}'
sh: /tmp/tmp.QufoC25722/setuptools-{: No such file or directory
./install_python27.sh: line 145: /opt/python2.7.8/bin/easy_install: No such file or directory
./install_python27.sh: line 148: /opt/python2.7.8/bin/pip: No such file or directory
./install_python27.sh: line 151: /opt/python2.7.8/bin/pip: No such file or directory


Looks like the script exited or got interrupted, cleaning up.

Error CentOS 5.8

This is the last part of the log

./install_python27.sh: line 80: cd: /opt/python2.7/lib/python2.7/config: No existe el fichero o el directorio (doesn't exists the file or directory)
ln: creando el enlace simbólico (creating symlink) «./libpython2.7.so» a «../../libpython2.7.so»: El fichero ya existe (the file already exists)
TEST FAILED: /opt/python2.7.2/lib/python2.7/site-packages does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /opt/python2.7.2/lib/python2.7/site-packages

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations

Please make the appropriate changes for your system and try again.
./install_python27.sh: line 85: /opt/python2.7.2/bin/easy_install: No existe el fichero o el directorio(doesn't exists the file or directory)
./install_python27.sh: line 88: /opt/python2.7.2/bin/easy_install: No existe el fichero o el directorio(doesn't exists the file or directory)
./install_python27.sh: line 91: /opt/python2.7.2/bin/easy_install: No existe el fichero o el directorio(doesn't exists the file or directory)
----------------------------------------------------
French maid time... let's clean everything.
----------------------------------------------------

----------------------------------------------------
Let's create some links for empty bash profile users out there.
----------------------------------------------------


Done !

The previous python was 2.4.3 and I was trying to compile python 2.7.3 but I could not. The files are in /usr/local/bin and /usr/local/lib (the default paths)

README.md is inconsistent: Was the script tested on 5.5 or 5.8?

At different locations, README.md claims that the script was tested on 5.5-5.7, or 5.6-5.8. Such apparent mistakes don't make me trust so much a script which I'm supposed to run as root anyway.

FYI, I run the script on 5.9 almost successfully - except for #10.

However, thanks for this repo anyway - the problems I found seem (up to now) mostly minor.

Exception while setting up virtualenv and fabric on Centos 5.9

I am attempting to use your script to install python 27 on a Centos 5.9 virtual machine. The installation proceeds fine until it gets to virtualenv and fabric. Below is the output of the script starting a bit above where the problem begins:

Processing setuptools-0.6c11-py2.7.egg
Copying setuptools-0.6c11-py2.7.egg to /opt/python2.7.9/lib/python2.7/site-packages
Adding setuptools 0.6c11 to easy-install.pth file
Installing easy_install script to /opt/python2.7.9/bin
Installing easy_install-2.7 script to /opt/python2.7.9/bin

Installed /opt/python2.7.9/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
Searching for pip
Reading http://pypi.python.org/simple/pip/
Best match: pip 6.0.6
Downloading https://pypi.python.org/packages/source/p/pip/pip-6.0.6.tar.gz#md5=bbb17814bdf82187f46aaf9cec6b6caa
Processing pip-6.0.6.tar.gz
Running pip-6.0.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-T1pyUf/pip-6.0.6/egg-dist-tmp-a8y8B3
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching 'pip/_vendor/Makefile'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'dev-requirements.txt'
no previously-included directories found matching '.travis'
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'contrib'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
Adding pip 6.0.6 to easy-install.pth file
Installing pip script to /opt/python2.7.9/bin
Installing pip2.7 script to /opt/python2.7.9/bin
Installing pip2 script to /opt/python2.7.9/bin

Installed /opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
The directory '/home/vagrant/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
Collecting virtualenv
  Exception:
  Traceback (most recent call last):
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/commands/install.py", line 339, in run
      requirement_set.prepare_files(finder)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_set.py", line 333, in prepare_files
      upgrade=self.upgrade,
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 305, in find_requirement
      page = self._get_page(main_index_url, req)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 783, in _get_page
      return HTMLPage.get_page(link, req, session=self.session)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 872, in get_page
      "Cache-Control": "max-age=600",
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 473, in get
      return self.request('GET', url, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/download.py", line 365, in request
      return super(PipSession, self).request(method, url, *args, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 461, in request
      resp = self.send(prep, **send_kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 573, in send
      r = adapter.send(request, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/cachecontrol/adapter.py", line 43, in send
      resp = super(CacheControlAdapter, self).send(request, **kw)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/adapters.py", line 370, in send
      timeout=timeout
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
      body=body, headers=headers)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
      self._validate_conn(conn)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
      conn.connect()
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 238, in connect
      ssl_version=resolved_ssl_version)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 254, in ssl_wrap_socket
      return context.wrap_socket(sock)
    File "/opt/python2.7.9/lib/python2.7/ssl.py", line 350, in wrap_socket
      _context=self)
    File "/opt/python2.7.9/lib/python2.7/ssl.py", line 537, in __init__
      raise ValueError("check_hostname requires server_hostname")
  ValueError: check_hostname requires server_hostname

The directory '/home/vagrant/.cache/pip/log' or its parent directory is not owned by the current user and the debug log has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
The directory '/home/vagrant/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want the -H flag.
Collecting fabric
  Exception:
  Traceback (most recent call last):
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/commands/install.py", line 339, in run
      requirement_set.prepare_files(finder)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/req/req_set.py", line 333, in prepare_files
      upgrade=self.upgrade,
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 305, in find_requirement
      page = self._get_page(main_index_url, req)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 783, in _get_page
      return HTMLPage.get_page(link, req, session=self.session)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/index.py", line 872, in get_page
      "Cache-Control": "max-age=600",
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 473, in get
      return self.request('GET', url, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/download.py", line 365, in request
      return super(PipSession, self).request(method, url, *args, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 461, in request
      resp = self.send(prep, **send_kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/sessions.py", line 573, in send
      r = adapter.send(request, **kwargs)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/cachecontrol/adapter.py", line 43, in send
      resp = super(CacheControlAdapter, self).send(request, **kw)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/adapters.py", line 370, in send
      timeout=timeout
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
      body=body, headers=headers)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
      self._validate_conn(conn)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
      conn.connect()
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 238, in connect
      ssl_version=resolved_ssl_version)
    File "/opt/python2.7.9/lib/python2.7/site-packages/pip-6.0.6-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py", line 254, in ssl_wrap_socket
      return context.wrap_socket(sock)
    File "/opt/python2.7.9/lib/python2.7/ssl.py", line 350, in wrap_socket
      _context=self)
    File "/opt/python2.7.9/lib/python2.7/ssl.py", line 537, in __init__
      raise ValueError("check_hostname requires server_hostname")
  ValueError: check_hostname requires server_hostname



Looks like the script exited or got interrupted, cleaning up.

Error on line 145

Hi,
I'm getting following error during the installation, please help.
Also what is the best way to install numpy, scipy and matplotlib after installing the 2.7.8?

---------------------------------------------------------------
Installing Pip, Fabric and Virtualenv
---------------------------------------------------------------

wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.
sh: /tmp/tmp.ABLnh32495/setuptools-0.6c11-py2.7.egg: No such file or directory
./install_python27.sh: line 145: /opt/python2.7.9/bin/easy_install: No such file or directory
./install_python27.sh: line 148: /opt/python2.7.9/bin/pip: No such file or directory
./install_python27.sh: line 151: /opt/python2.7.9/bin/pip: No such file or directory

Looks like the script exited or got interrupted, cleaning up.

Thank you for your help.
Tom

Script does not create /opt/bin when needed

On my system /opt/bin does not exist, but the script tries to use it anyway and fails.
I think that

mkdir -p ${dest}/bin || { echo "Failed because..."; exit 1; }

would solve the problem.

Then, it prints

Looks like the script exited or got interrupted, cleaning up.

But it gives no idea whether the script succeeded or failed. In fact, the first thing I tried was launching the script again after creating /opt/bin, but that restarted the whole compilation process, not what I expected.

exception installing on centOS 5.10 VM

I tried to run the script on CentOs 5.10 VM (virtual box). I ran as root.

./install_python27.sh

Seems to run fine until:

Using /usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
Collecting virtualenv
Exception:
Traceback (most recent call last):
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/req/req_set.py", line 333, in prepare_files
upgrade=self.upgrade,
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 305, in find_requirement
page = self._get_page(main_index_url, req)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 783, in _get_page
return HTMLPage.get_page(link, req, session=self.session)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 872, in get_page
"Cache-Control": "max-age=600",
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 473, in get
return self.request('GET', url, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 365, in request
return super(PipSession, self).request(method, url, *args, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 461, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 573, in send
r = adapter.send(request, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/cachecontrol/adapter.py", line 43, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
body=body, headers=headers)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
self._validate_conn(conn)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
conn.connect()
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/vendor/requests/packages/urllib3/util/ssl.py", line 254, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/local/python2.7.9/lib/python2.7/ssl.py", line 350, in wrap_socket
_context=self)
File "/usr/local/python2.7.9/lib/python2.7/ssl.py", line 537, in init
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

Collecting fabric
Exception:
Traceback (most recent call last):
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/basecommand.py", line 232, in main
status = self.run(options, args)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/commands/install.py", line 339, in run
requirement_set.prepare_files(finder)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/req/req_set.py", line 333, in prepare_files
upgrade=self.upgrade,
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 305, in find_requirement
page = self._get_page(main_index_url, req)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 783, in _get_page
return HTMLPage.get_page(link, req, session=self.session)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/index.py", line 872, in get_page
"Cache-Control": "max-age=600",
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 473, in get
return self.request('GET', url, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 365, in request
return super(PipSession, self).request(method, url, *args, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 461, in request
resp = self.send(prep, *_send_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/sessions.py", line 573, in send
r = adapter.send(request, *_kwargs)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/cachecontrol/adapter.py", line 43, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/adapters.py", line 370, in send
timeout=timeout
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 518, in urlopen
body=body, headers=headers)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 322, in _make_request
self._validate_conn(conn)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connectionpool.py", line 727, in _validate_conn
conn.connect()
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/connection.py", line 238, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/python2.7.9/lib/python2.7/site-packages/pip-6.0.7-py2.7.egg/pip/vendor/requests/packages/urllib3/util/ssl.py", line 254, in ssl_wrap_socket
return context.wrap_socket(sock)
File "/usr/local/python2.7.9/lib/python2.7/ssl.py", line 350, in wrap_socket
_context=self)
File "/usr/local/python2.7.9/lib/python2.7/ssl.py", line 537, in init
raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

Looks like the script exited or got interrupted, cleaning up.

Any suggestions?

Thanks

installing python 2.7 on centos 5.8

When i execute your script>
line 87: syntax error near unexpected token &&' line 87:&&'

1)uname -a
Linux europa.fm 2.6.32-4-pve #1 SMP Fri Nov 26 06:42:28 CET 2010 i686 i686 i386 GNU/Linux
2)whish bash
/bin/bash

chmod a+x install.sh
./install.sh (user=root)

Got error CentOS5.8

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

building 'Crypto.Hash._MD2' extension

creating build/temp.linux-x86_64-2.7

creating build/temp.linux-x86_64-2.7/src

gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/opt/python2.7.2/include/python2.7 -c src/MD2.c -o build/temp.linux-x86_64-2.7/src/MD2.o

gcc -pthread -shared build/temp.linux-x86_64-2.7/src/MD2.o -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/Crypto/Hash/_MD2.so

/usr/bin/ld: cannot find -lpython2.7

collect2: ld returned 1 exit status

error: command 'gcc' failed with exit status 1


Command /usr/bin/python2.7 -c "import setuptools;file='/tmp/build/pycrypto/setup.py';exec(compile(open(file).read().replace('\r\n', '\n'), file, 'exec'))" install --single-version-externally-managed --record /tmp/pip-rY4ydf-record/install-record.txt failed with error code 1 in /tmp/build/pycrypto

Storing complete log in /root/.pip/pip.log

French maid time... let's clean everything.


Let's create some links for empty bash profile users out there.

./install_python27.sh: line 125: unexpected EOF while looking for matching `"'
./install_python27.sh: line 126: syntax error: unexpected end of file

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.