Setting up python environment in macOS using Homebrew, Pyenv, and Pipenv
Pyenv and Pipenv are necessary tools if you are working on different projects that need to be deployed to production and maintain a clean codebase.
Published in
5 min readFeb 4, 2021
We often have a problem when working on different projects in the local system
- we might need different python versions for different projects (less common) or
- we might need python packages compatible with particular versions (more likely).
- 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.