Install Python3.4 under Ubuntu and compile the py file with Python

Source: Internet
Author: User

1. Installing the Python 3.4 programsudo apt-get install python3.4
2.python 3.4 is installed by default in /usr/local/lib/python3.4, delete default Pythonlink file/usr/bin/python, reestablish connection relationship sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3.4 /usr/bin/python
3. Confirm Python version pythonEnter quit () to exit, if the display is python3.4 version, the success 4. Restore Python low versionsudo apt-get install--reinstall python-minimal
5.Create a new uu.py file in the home folder, put print (' Hello world! ') To copy it in. 6. Testing Python3 uu.py
If this runs successfully, it will be done. It is also said that Ubuntu comes with the Python3 version and the 2 version, but it seems to be doing this to make the default version 3.4

Install Python3.4 under Ubuntu and compile the py file with 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.