By default, you do not need to install or configure anything else to use Python 2. This article is aimed to serve as a shortcut or references on how to setup Python3 Development Environment. Basically you will need to install the following:
1. XCode & XCode Command Line Tools
You can download and install XCode from AppStore. XCode is free and is at least 4.5 GB in size and may take some time to download (must have an Apple account).
To install Command Line Tools, you can issue below command “xcode-select –install”
2. Install and Setup Homebrew
Type below command on Terminal
/usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”
Once above installation completes, we’ll set PATH environment variable for Homebrew:
# Add the following
On Terminal, type below command to activate changes
To check if it works, type
# And you should get: Your system is ready to brew.
3. Install Python3
Simply type below command on Terminal. Along with Python3, Homebrew will install pip, setuptools and wheel.
brew install python3
# It will take some time. You may want to keep everything updated by typing
brew upgrade python3
4. Create Virtual Environment
python3.6 -m venv my_env
Your virtual environment is ready to use.
Congratulations, you have your MAC ready as Python Development Environment. Please leave your comments, ideas or share if you find this article helpful.
One response to “Setup Python3 Development Environment on Mac”
Thank you for your comprehensive guide.