Server (Linux) installation Python3

Source: Internet
Author: User

1.python3 and Python2 can coexist without deleting their own python2

Server Linux under the default system comes with python2.6 version, this version of the system is dependent on many programs, so it is not recommended to delete.
If you are using the latest Python3 then we know that there is no effect between compiling and installing the source package and the system default package.

2. Download the Python3 source package on the website

Website: https://www.python.org/

Then click on the downloads in the navigation bar,
You can also click on the Downloads pop-up menu to select Source Code,
is the source package meaning, here choose the latest version 3.5.6,
There are also many other historical versions of the following,
Click on the page below to see the download link,
Includes source package, Mac OSX installation package, Windows installation package

Here you select the first (gzipped source tarball) Download,
Download is the source package: python-3.5.6.tgz.

3. Pre-installation preparation to ensure that our system has all the necessary development dependencies

CentOS 7:

#yum-y groupinstall#yum-y install Zlib-devel

Debian:

#aptitude-y install gcc make Zlib1g-dev

4. upload python-3.5.6.tgz to the server, ready to install

(Friendly recommendation Bitvise server file visualization software)

-xvzf Python-3.5.6. tgz Enter directory: cd Python-3.5.6/ Add configuration: (Configure your own installation directory here). /configure--prefix=/usr/python next compile Source: Make perform installation: make install

The whole process is about 5-10 minutes,

After the installation is successful, the installation directory is/usr/python

5. Verify that it is installed as

# which Python3 # python3-v

That is OK

6. Exit

quit () or exit ()

Server (Linux) installation Python3

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.