Installing Virtual Environment for Python on Windows | Ubuntu | Linux | MacOs
Virtual environment is a tool that helps to create an isolated environment for installing dependencies in a Python project. If virtual environment is not available on your computer then follow these steps to install it:
- Make sure you have expected version of Python available on your computer. You can check this by running:
- Check if pip is already available on your computer by running this:
- If pip is not available on your computer then install it by running this:
- Install virtual environment by running this:
py --version
python3 --version
py -m pip --version
python3 -m pip --version
py -m ensurepip --default-pip
python3 -m ensurepip --default-pip
py -m pip install --user virtualenv
python3 -m pip install --user virtualenv