How Do I Use Python 2 Instead of 3 Ubuntu?
Contents

How do I use python 2 instead of 3 in Linux?

What you could alternatively do is to replace the symbolic link “python” in /usr/bin which currently links to python3 with a link to the required python2/2. x executable. Then you could just call it as you would with python 3. You could use alias python=”/usr/bin/python2.

How do I use python 2.7 instead of 3 in Ubuntu?

Step 1) Install Python 2 with the command below. Step 2) Check the Python versions present in your system by running the command below. Step 3) In this post, we currently have Python 2 and Python 3 available. Now write your Python 2 or Python 3 code.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest