Installing python2.7.9 and pip1.5.5 under CentOS

Source: Internet
Author: User
Tags install openssl install pandas install matplotlib

Used to use Ubantu under the Python,ubantu comparison card. Prefer to use CentOS, but the default Python version is too low, so reload a python and Ipython
centos6.5 Installation python2.7.9First step: Install Devtoolset[Email protected] ~]# yum groupinstall "Development tools"Step Two: Install the packages needed to compile Python[Email protected] ~]# yum install zlib-devel[Email protected] ~]# yum install bzip2-devel[Email protected] ~]# yum install openssl-devel[Email protected] ~]# yum install ncurses-devel[Email protected] ~]# yum install sqlite-develstep three: Download and unzip python2.7.9[Email protected] ~]# cd/usr[Email protected] usr]# wget--no-check-certificate https://www.python.org/ftp/python/2.7.9/ Python-2.7.9.tar.xz[Email protected] usr]# TAR-ZXVF python-2.7.9.tar.xz[Email protected] usr]# chmod u+x python-2.7.9.tar.xz[Email protected] usr]# tar XF python-2.7.9.tar.xz
Fourth Step: Compiling and installing python2.7.9[Email protected] python-2.7.9]#/configure--prefix=/usr/local[[email protected] python-2.7.9]# make && make install
Fifth Step: Point the python command to Python 2.7.9 (it seems that I don't have to use it)[Email protected] ~]# ln-s/usr/local/bin/python2.7/usr/local/bin/python #好多文章说要这步, But my not using this step is already 2.7.9 version of the.    centos6.5 Installation pip1.5.5First step: Download pip1.5.5 and unzip[Email protected] usr]# wget--no-check-certificate https://github.com/pypa/pip/archive/1.5.5.tar.gz [Email protected] usr]# chmod u+x 1.5.5[Email protected] usr]# tar-zxvf 1.5.5[Email protected] usr]# CD pip-1.5.5Step three: Install Pip[[email protected] pip-1.5.5]# python setup.py install #执行这个命令报错, no Setuptools module, must be installed first################################################################################Step Two: Install Setuptools[Email protected] usr]# wget http://pypi.python.org/packages/source/s/setuptools/ Setuptools-0.6c11.tar.gz--no-check-certificate #可以加在后面, be sure to add this part of the back, or not download[Email protected] usr]# chmod u+x setuptools-0.6c11.tar.gz[Email protected] usr]# TAR-ZXVF setuptools-0.6c11.tar.gz[Email protected] usr]# CD setuptools-0.6c11[[email protected] usr]# python setup.py build [[email protected] usr]# python setup.py install################################################################################Step three: Install Pip[Email protected] pip-1.5.5]# python setup.py install #现在可以进行pip安装[Email protected] ~]# pip install-u pip #更新pip################################################################################Fourth Step: Install the relevant packages for scientific calculations[Email protected] ~]# pip install numpy #矩阵运算[Email protected] ~]# pip install scipy #线性代数或各种优化[Email protected] ~]# pip install pandas #数据分析[Email protected] ~]# pip install matplotlib #可视化[Email protected] ~]# pip install-u nltk #自然语言处理[[email protected] ~]# pip install-u scikit-learn #机器学习库 #这个安装了但是进入python导入不成功, subsequent re-resolution
#################################################################################[[email protected] ~]# pip install Ipython #安装ipython. Ipython here, it's ready to install.[Email protected] ~]# yum install Readline-devel #这一步是因为网上有帖子ipython需要依赖包, by the way. References:http://www.cnblogs.com/dudu/p/4294238.html  

Installing python2.7.9 and pip1.5.5 under CentOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.