Skip to content

Instantly share code, notes, and snippets.

@atifazad
Last active March 4, 2020 23:27
Show Gist options
  • Save atifazad/38299d14fd5b7e9e3fe02dc1c3b94be6 to your computer and use it in GitHub Desktop.
Save atifazad/38299d14fd5b7e9e3fe02dc1c3b94be6 to your computer and use it in GitHub Desktop.
Setup virtualenvwrapper on Mac OS Catalina
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
# Step-1: Install Homebrew, if you don’t have it already.
# There are other possibilities as well to install Python3 but I recommend installing it via Homebrew for cleaner installation and easier maintenance (upgrade etc).
# > /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
# Step-2: Install Python3 (pip3 gets installed automatically)
# > brew install python3
# Step-3: Install Virtualenvwrapper
# > sudo -H pip3 install virtualenvwrapper
# Step-4: In .zshrc (or bashrc), add following lines:
export WORKON_HOME=$HOME/.virtualenvs
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
# Step-5: Run following command to load the new configuration
# > source ~/.zshrc
# or
# > source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment