Install Python3 in Ubuntu

Source: Internet
Author: User
First download the latest Python version. Here, my version is Python3.1.1. Then install it in the Ubuntu environment and switch to the Python file directory :. /configuremakemaketestsudomakeinstall may encounter several problems here. The first one is in. /configure, Ccompilercannotcreateexecutables may occur. To solve this problem, you can

First download the latest version of Python. Here, my version is Python 3.1.1. Then install it in the Ubuntu environment and switch to the Python file directory:

./Configure
Make
Make test
Sudo make install

There may be several problems here. The first one is in. /configure, C compiler cannot create executables may occur. To solve this problem, use the sudo apt-get install build-essential command to solve it.

Another problem is that, after the installation is complete, the Python command is used to test whether the installation is successful. If Python2.6 is pre-installed, the old version is still displayed. The reason is that -- prefit is not set during installation. It is installed in the/usr/local directory by default, and the/usr/binfile is still connected to the original Python version. Solution:

Sudo rm/usr/bin/python

Sudo ln/usr/local/python */usr/bin/python.

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.