Friday, August 13, 2021

Virtual Environment Packages

 What is Virtual Environment?

A virtual environment is a tool that helps to keep dependencies required by different projects in separate places by creating an isolated Python virtual environments. Python virtual environment is mostly used by Python developers. The virtual environment can be created in Windows, Linux and Mac OS. 


Source: https://blog.debugeverything.com/virtual-environments-with-python-virtualenv/


Create Virtual Environment in MacOS/Linux

        python3 -m venv "name of the environment"

  • Now navigate to the environment that you have created using cd command:
  • Activate the environment using:
           source bin\activate

Create Virtual Environment in Windows

                python3 -m venv "name of the environment"
  • Now navigate to the environment that you have created using cd command:
  • Activate the environment using:
           \Scripts\activate.bat

1 comment: