Setting up python environment in macOS using Homebrew, Pyenv, and Pipenv

We often have a problem when working on different projects in the local system

  1. we might need different python versions for different projects (less common) or
  2. we might need python packages compatible with particular versions (more likely).
  3. Virtual environments for different projects for easy deployments

After stumbling with this problem, I found a perfect solution using two awesome libraries — Pyenv and Pipenv.

Pyenv is to manage Python versions, and Pipenv is to create virtual environments required for each project and manage python packages and their dependencies for each project.

This is a great way of working on different projects locally without any hassles.

We will use Homebrew to install Pyenv and Pipenv. If you already have Homebrew, skip the next step.

Website

Tags: Pipenv Pyenv