Pip and virtualenv on a Mac

Written by Art, June 18, 2017

Install pip

Pip (Python Package Installer), official documentation for pip.

Usually Python3 comes with pip preinstalled. If you get an error "pip command not found", use the following command to install pip:

sudo easy_install pip

Install virtualenv

virtualenv is a tool to create isolated Python projects. Think of it, as a cleanroom, isolated from other virsions of Python and libriries.

Enter this command into terminal

sudo pip install virtualenv

or if you get an error

sudo -H pip install virtualenv

Start virtualenv

Navigate to where you want to store your code. Create new directory.

mkdir my_project && cd my_project

INSIDE my_project folder create a new virtualenv

virtualenv env

Activate virtualenv

source env/bin/activate

Share with:

About author


Art is a FinTech enthusiast who has a great passion for coding and teaching. He earned a M.Sc. from Adelphi University, Garden City, New York. Currently, he develops software for the financial services industry and leads classes and workshops in Python at PracticalProgramming.co

Python Immersive

Become a proficient Python programmer, master programming skills by working on real life projects

Learn more

Python for Data Science

Acquire Crucial Skills for the 21st century, Weekends , Master your analytical skills by working on real life projects

Learn more

React JS 101

React has become the most powerful Javascript library as of 2018, Originally developed by Facebook ...

Learn more

Intro to Crypto & Blockchain

This course explains how to analyze, trade and build your own Blockchain tokens

Learn more

Python 101

This class aims to help beginners to feel justifiably confident to start using Python programming language

Learn more