Setup for Mac

It's is encourage to install virtualenv and virtualenvwrapper to manage

Step 1: Install Python

Macbook's default environment comes with python 2.7, we will install virtualenv and virtualenvwrapper in python2.7, but we will still need to install python3.X

Install Homebrew ( Mac User ) - Homebrew

Execute the following command inside terminal

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

The script will download homebrew and install in your mac environment. Once the installation is done, run the following command in your terminal to install python3

Install Python

brew install python3

after install python3, we will need to link python3 to our PATH. Run the following command to link

brew link python3

Step 2: Install VirtualEnv & VirtualEnvWrapper

Run the following command to install the libraries

sudo pip install virtualenv virtualenvwrapper

Enter your mac password and allow it to install

In order for us to use the command from virtualenvwrapper, we will need to link the bash script to our terminal. Run the following command to link the bash file

echo "source /usr/local/bin/virtualenvwrapper.sh" >> .bash_profile
source ~/.bash_profile

How to use VirtualEnv - click here

Last updated

Was this helpful?