A virtual environment allows your projects to operate independently from the main Python environment. It provides an effective way to prevent version conflicts between dependencies of different projects.
It only takes one command to create the virtual environment.
But, there’re multiple steps that must be completed beforehand.
This article covers all of the steps needed from start to finish.
It’s written for Windows, but it’s also available for MacOS.
Virtualenv is the tool we’re going to use to create the virtual environment.
In this section, we’ll use pip to install virtualenv:
python -m pip install virtualenv
We need to know the Python version we have to rename its executable file.
In this section, we’ll use Command Prompt to get the Python version:
python --version
#virtual-environment #command-line #python #windows-10 #libraries