Install Python3.4 on centos

Source: Internet
Author: User

Install Python3.4 on centos

1. Install Python dependency packages

 

yum groupinstall "Development tools"yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel

2. Download and compile the Python3.4 source code package

 

 

wget https://www.python.org/ftp/python/3.4.1/Python-3.4.1.tgztar xf Python-3.4.1.tgzcd Python-3.4.1./configure --prefix=/usr/local --enable-sharedmakemake install

3. Configure the library before running Python:

 

 

echo /usr/local/lib >> /etc/ld.so.conf.d/local.confldconfig

4. Run the demo:

 

 

python3 --versionPython 3.4.1

5. Delete the library required for compiling Python.

 

 

yum groupremove "Development tools" --remove-leavesyum remove zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel --remove-leaves

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.