How To Install python2-virtualenv on Rocky Linux 8

In this tutorial we learn how to install python2-virtualenv on Rocky Linux 8. python2-virtualenv is Tool to create isolated Python environments

Introduction

In this tutorial we learn how to install python2-virtualenv on Rocky Linux 8.

What is python2-virtualenv

virtualenv is a tool to create isolated Python environments. virtualenv is a successor to workingenv, and an extension of virtual-python. It is written by Ian Bicking, and sponsored by the Open Planning Project. It is licensed under an MIT-style permissive license

We can use yum or dnf to install python2-virtualenv on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install python2-virtualenv.

Install python2-virtualenv on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python2-virtualenv using dnf by running the following command:

sudo dnf -y install python2-virtualenv

Install python2-virtualenv on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python2-virtualenv using yum by running the following command:

sudo yum -y install python2-virtualenv

How To Uninstall python2-virtualenv on Rocky Linux 8

To uninstall only the python2-virtualenv package we can use the following command:

sudo dnf remove python2-virtualenv

python2-virtualenv Package Contents on Rocky Linux 8

/usr/bin/virtualenv-2
/usr/bin/virtualenv-2.7
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/PKG-INFO
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/SOURCES.txt
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/dependency_links.txt
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/entry_points.txt
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/not-zip-safe
/usr/lib/python2.7/site-packages/virtualenv-15.1.0-py2.7.egg-info/top_level.txt
/usr/lib/python2.7/site-packages/virtualenv.py
/usr/lib/python2.7/site-packages/virtualenv.pyc
/usr/lib/python2.7/site-packages/virtualenv.pyo
/usr/lib/python2.7/site-packages/virtualenv_support
/usr/lib/python2.7/site-packages/virtualenv_support/__init__.py
/usr/lib/python2.7/site-packages/virtualenv_support/__init__.pyc
/usr/lib/python2.7/site-packages/virtualenv_support/__init__.pyo
/usr/share/doc/python2-virtualenv
/usr/share/doc/python2-virtualenv/AUTHORS.txt
/usr/share/doc/python2-virtualenv/PKG-INFO
/usr/share/doc/python2-virtualenv/changes.rst
/usr/share/doc/python2-virtualenv/development.rst
/usr/share/doc/python2-virtualenv/index.rst
/usr/share/doc/python2-virtualenv/installation.rst
/usr/share/doc/python2-virtualenv/reference.rst
/usr/share/doc/python2-virtualenv/userguide.rst
/usr/share/licenses/python2-virtualenv
/usr/share/licenses/python2-virtualenv/LICENSE.txt

References

Summary

In this tutorial we learn how to install python2-virtualenv on Rocky Linux 8 using yum and dnf.