Activating Multiple Environments Simultaneously
Let’s say you want to use the
isort formatters for the
bree project. Instead of adding those formatters to each project, I usually create a virtual environment specific for those tools and activate both that virtual environment and the actual project virtual environment.
So, let’s start by creating a virtual environment named
formatters from Python 3.9.0, after which you can use
pyenv shell formatters to activate the virtual environment, install
black and install
Let’s clear the screen and check
pyenv version, which will show that you’re still in the
bree virtual environment and when you run the
pyenv will tell you that this is not found in the
bree virtual environment, but it is found in the
formatters virtual environment.
So, how would you access
isort while you’re working on the
bree project? You could use the
pyenv shell each time you want to run them, but there is an easier way. After all, this lesson is about activating multiple environments simultaneously.
Become a Member to join the conversation.