Centos Python3 Installation Coexistence

Source: Internet
Author: User
Tags install openssl

Installation of python3.6 may use dependencies

yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel

Download python3.6 Compilation Installation

Download https://www.python.org on the Python website

To download the latest version of the source code, use make Altinstall, if you use makes install, there will be two different versions of Python in the system in the/usr/bin/directory. This will lead to a lot of problems and is not easy to handle.

wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xzxz -d Python-3.7.0.tgz.xztar -xvf  Python-3.7.0.tgzcd  Python-3.7.0

Installing the Python3.6 into the/usr/local directory

./configure --prefix=/usr/localmakemake altinstall

Error handling:

    • Zipimport.importerror

    • Yum Install zlib Zlib-devel

    • Configure:error:no acceptable C compiler found in $PATH

      Yum Install GCC
    • **modulenotfounderror:no module named ' _ctypes ' * *

Execution file for python3.6 program:/usr/local/bin/python3.6

python3.6 application directory:/usr/local/lib/python3.6

PIP3 execution File:/usr/local/bin/pip3.6

Pyenv3 execution File:/usr/local/bin/pyenv-3.6

Change/usr/bin/python Link

cd/usr/binln -s /usr/local/bin/python3.6 /usr/bin/python3ln -s /usr/local/bin/pip3.6 /usr/bin/pip3

Centos Python3 Installation Coexistence

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.