First, update the Python version
1. View the Python version
[Email protected] ipython-5.1.0]# python-v
Python 2.6.6
2. Download python-2.7.3
https://www.python.org/download/releases/2.7.3/
python-2.7.3.tar.bz2
3. Unzip and change the working directory
TAR-JXVF python-2.7.3.tar.bz2
CD Python-2.7.3
4. Installation
./configure
Make all
Make install
Make clean
Make Distclean
/usr/local/bin/python2.7-v
5. Create a soft link to make the system default Python point to python2.7
[Email protected] python-2.7.3]# mv/usr/bin/python/usr/bin/python2.6.6
[Email protected] python-2.7.3]# ln-s/usr/local/bin/python2.7/usr/bin/python
[Email protected] python-2.7.3]# python-v
Python 2.7.3
6. Specify the python version of Yum
Fix system Python soft links point to Python2.7 version, since Yum is not compatible with Python 2.7, Yum does not work and we need to
Vi/usr/bin/yum Change the #!/usr/bin/python of the file header to #!/usr/bin/python2.6.6
Second, install Pip
1. Download and install Setuptools
2. Download and install Pip
Third, install NumPy, Pandas, SciPy, matplotlib
1. Installing dependent Packages
SciPy need to rely on third-party packages such as Atlas, Blas, etc.
Yum Install Blas-devel Lapack-devel
2. Install with PIP
Pip Install NumPy
Pip Install Pandas
Pip Install scipy
Pip Install Scikit-learn
Pip Install Matplotlib
Install NumPy, SciPy, Scikit-learn under CentOS 6.5