Fundamentals 5 min read

How to Install Python 3 on Ubuntu 14.04 and Switch Between Python 2 & 3

This guide walks you through installing Python 3 (including specific version commands) on Ubuntu 14.04, explains the limitations of older Ubuntu releases, and shows how to toggle between the system‑provided Python 2.7 and the newly installed Python 3 interpreter.

Python Crawling & Data Mining
Python Crawling & Data Mining
Python Crawling & Data Mining
How to Install Python 3 on Ubuntu 14.04 and Switch Between Python 2 & 3

Earlier we covered installing Ubuntu 14.04; now we demonstrate a straightforward method to install Python 3 on that system and switch between Python 2 and Python 3.

1. Ubuntu ships with Python 2.7 pre‑installed; you can start it by running python2 in the terminal.

2. To install Python 3, execute sudo apt-get install python3.4. Replace 3.4 with 3.5 or 3.6 if you need those versions and the packages are available.

If Python 3.4 is already installed, the installation steps will be brief; otherwise you will see the full installation progress.

3. Older Ubuntu releases (e.g., 12.04) only provide older Python 3 packages such as Python 3.2, which you can install similarly.

Ubuntu 12.04 does not have packages for Python 3.4, so installation will fail.

4. Ubuntu 14.04 also lacks packages for Python 3.5 and 3.6, resulting in “package not found” errors.

To use newer Python 3 versions, upgrade to Ubuntu 16.04 or later.

5. After installing Python 3.4, run python3 to start the Python 3 interpreter.

6. The default python command still points to Python 2.7.

7. To switch to Python 3, use python3 or specify the version, e.g., python3.4.

This method is one of the simplest ways to install Python on Ubuntu; avoid removing the system‑provided Python 2, as other applications may depend on it.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Ubuntupython3
Python Crawling & Data Mining
Written by

Python Crawling & Data Mining

Life's short, I code in Python. This channel shares Python web crawling, data mining, analysis, processing, visualization, automated testing, DevOps, big data, AI, cloud computing, machine learning tools, resources, news, technical articles, tutorial videos and learning materials. Join us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.