Skip to main content

Virtual Environment

Python Activities needs Python to be installed in the system. We can use a virtual environment of Python also to automate Python activities.

Virtual Environment Creation

  • Go to Python Installation location.
  • Open the location in Command Prompt.
  • Run the command python -m venv ''<virtual-environment-path>'' to create the virtual environment.

Package Management for Created Virtual Environment

  • Go to the virtual environment location.
  • Open the location in Command Prompt.
  • Run the command Scripts\activate.bat to activate the virtual environment.
  • Run the command pip list to see the installed packages in the virtual environment.
  • Run the command pip install <package-name> to install the needed package in virtual environment.
  • Run the command deactivate to deactivate the virtual environment.