Setting up a virtual environment
To set up a virtual environment follow the procedure explained in the article Create virtual environment using venv.
To set up a fresh virtual environment, you need the virtualenv package, so install the package globally with the command :
pip install virtualenv
This will install virtualenv on your global python environment, so we can now create a virtual environment anywhere on our system. To create a virtual environment, we will use the virtualenv command followed by the name of the virtual environment. Make sure to be in the desired location on your system, the below command will create a directory in the current location.
virtualenv venv
So, this will create a fresh virtual environment in your folder, we also need to activate the virtual environment. To activate a virtual environment you need to execute a file called activate depending on your Operation System.
For Linux/macOS:
source venv/bin/activate
So this is all we need to create a virtual environment, we can now install any python package in this activated environment.
Installing and Using Rich Package in Python
In this article, We are going to learn how to install and use rich packages in Python.
RIch is a python package for creating some awesome terminal formatting and logging. It has several features and functions that can make your application look nicer and even add a new look to your CLI application. We will be understanding the process of installing and basic usage of the RICH package in Python in this article.