Skip to content
JsDevLife
Menu
  • Home
  • Leetcode in JS
  • About me
  • Contact Us
Menu

Install Python 3 on Mac

Posted on March 22, 2020 by Vikas Kad

Install Python 3 on Mac

In this tutorial, we are going to install python3 in Mac OS. There are multiple ways to install like downloading from the official site or homebrew.

Check whether python2 installed or not

Initially, MacOS came preinstalled with Python 2, however, starting with Mac 10.15 this is no longer the case. And since Python 2 will no longer be officially supported as of January 1, 2020, you should really use Python 3 instead.

Check whether python3 already installed or not:

Before we start, make sure Python 3 isn’t already installed on your computer. Open up the command line via the Terminal application which is located at Applications -> Utilities -> Terminal.
$ python --version



Install Python 3
Python version

Xcode Installation:

The first step for Python 3 is to put in Apple’s Xcode program which is important for iOS improvement as nicely as most programming tasks. We will use XCode to put in Homebrew.

In your Terminal app, run the following command to install XCode and its command-line tools:

$ xcode-select --install

Install Homebrew

Next install Homebrew by copy/pasting the following command into Terminal and then type Enter:
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
To confirm Homebrew installed correctly, run this command:
$ brew doctor
Your system is ready to brew.


Install Python 3

Now we are ready to install the latest version of Python 3.
Type the below command  to install it:
$ brew install python3
To check which version of Python 3 was installed, run the below command in Terminal:
$ python3 --version
Python 3.7.4
Finally, to run our new version of Python 3 open an interactive shall by:
Note: that it is still possible to run Python 2 by simply typing python:

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Solving LeetCode Problem 79 – Word Search in JavaScript
  • Solving LeetCode Problem 48: Rotate Image using JavaScript
  • Solving the “Container With Most Water” LeetCode Problem in JavaScript – A Comprehensive Guide
  • LeetCode Solution: 54: Spiral Matrix in JavaScript
  • Solution to LeetCode Problem 31. Next Permutation in JavaScript

Archives

  • 2023 (5)
  • 2022 (20)
  • 2021 (2)
  • 2020 (4)
  • 2019 (14)
  • 2018 (17)

Categories

  • blockchain development
  • Blog
  • crystal
  • flutter
  • flutter.io
  • GitHub
  • Installation
  • Ionic Framework
  • javascript
  • leetcode-in-js
  • masteringInJavasript
  • mcqs
  • MongoDB
  • nodejs
  • Object Oriented Javacript
  • python
  • smart contracts
  • visual studio

Quick Links

  • Home
  • Leetcode in JS
  • About me
  • Contact Us

Terms of service

  • Terms Of Service
  • Disclaimer
©2023 JsDevLife | Design: Newspaperly WordPress Theme