Recently in the study "Spark machine learning this book", the book used Ipython, the machine is Redhat version, with the Python2.6.6, installation needs to upgrade more than 2.7, or will report
IPython requires Python version 2.7 or 3.3 or above. This is a mistake. The following is the process of resolution.
1.Python Installation Upgrade Step 1 installation Pyhton2.7
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
Tar xjvf python-2.7.5.tar.bz2
CD Python-2.7.5
./configure--prefix=/usr/local/python2.7
Make-j 8
Make install
Configure Python to use Python2.7 as the default development tool
Mv/usr/bin/python/usr/bin/python_old
Ln-s/usr/local/python2.7/bin/python/usr/bin/
Change the Yum profile
Yum using the python2.4 tool, the above steps enable the Python2.7,python upgrade will cause Yum to be unavailable.
Modify the configuration of Vim Vim/usr/bin/yum
Will
#!/usr/bin/python
Change to
#!/usr/bin/python_old
Or #!/usr/bin/python-tt changed to #!/usr/bin/python_old-tt will display an error message.
Python-t:issue Warnings about inconsistent tab usage (-tt:issue errors)
If you do not modify #!/usr/bin/python to #!/usr/bin/python_old, you will be prompted for a boot error: Importerror:no Module named Dbus
Install Python-setuptools
Must be installed in the source code, if Yum installed, it is possible to install the corresponding to the python2.6 version
wget--no-cookie--no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
# (above because of the use of HTTPS and SSl, you need to use the above two parameters, otherwise can not download, will prompt "Unable to establish SSl connection")
Tar xzvf setuptools-0.6c11.tar.gz
CD SETUPTOOLS-0.6C11
Python setup.py Build
Python setup.py Install
2. Install Pip
wget--no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz
Tar zvxf 1.5.5.tar.gz #解压文件
CD pip-1.5.5/
Python setup.py Install
Set environment variable, otherwise no Pip found
Export path= "/usr/local/python2.7/bin: $PATH"
Install Ipython
Pip Install Ipython
Ln-s/usr/local/python/bin/ipython/usr/bin/ipython
Get.