How to Create a Python3 Virtual Environment with VirtualEnv?

To create a virtual environment running Python version 3 using VirtualEnv run the following command:

virtualenv env_name -p python3

We use the -p  option to specify the version of Python we want to use. Without this, it will default to Python version 2 which comes installed by default on macOS.

After activating the virtual environment with source bin/activate , run python --version  to show the version of python in use.

Error: Invalid Map Provider

Published by <span class='p-author h-card'>Aboubacar Douno</span>

Head of Engineering at @ehealth_africa | Founder of @anzisha_io & @dounotech | A passion for tech, languages, minimalism, plant-based nutrition and travelling

Leave a comment