How To Install python3-argcomplete on Rocky Linux 8

In this tutorial we learn how to install python3-argcomplete on Rocky Linux 8. python3-argcomplete is Bash tab completion for argparse

Introduction

In this tutorial we learn how to install python3-argcomplete on Rocky Linux 8.

What is python3-argcomplete

Argcomplete provides easy, extensible command line tab completion of arguments for your Python script. It makes two assumptions * You are using bash as your shell * You are using argparse to manage your command line arguments/options Argcomplete is particularly useful if your program has lots of options or subparsers, and if your program can dynamically suggest completions for your argument/option values (for example, if the user is browsing resources over the network). Python 3 version.

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

Install python3-argcomplete 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 python3-argcomplete using dnf by running the following command:

sudo dnf -y install python3-argcomplete

Install python3-argcomplete 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 python3-argcomplete using yum by running the following command:

sudo yum -y install python3-argcomplete

How To Uninstall python3-argcomplete on Rocky Linux 8

To uninstall only the python3-argcomplete package we can use the following command:

sudo dnf remove python3-argcomplete

python3-argcomplete Package Contents on Rocky Linux 8

/etc/bash_completion.d/python-argcomplete.sh
/usr/bin/activate-global-python-argcomplete
/usr/bin/python-argcomplete-check-easy-install-script
/usr/bin/python-argcomplete-tcsh
/usr/bin/register-python-argcomplete
/usr/lib/python3.6/site-packages/argcomplete
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/not-zip-safe
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/argcomplete-1.9.3-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/argcomplete/__init__.py
/usr/lib/python3.6/site-packages/argcomplete/__pycache__
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/_check_module.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/_check_module.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/completers.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/completers.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/my_argparse.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/my_argparse.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/my_shlex.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/argcomplete/__pycache__/my_shlex.cpython-36.pyc
/usr/lib/python3.6/site-packages/argcomplete/_check_module.py
/usr/lib/python3.6/site-packages/argcomplete/bash_completion.d
/usr/lib/python3.6/site-packages/argcomplete/bash_completion.d/python-argcomplete.sh
/usr/lib/python3.6/site-packages/argcomplete/compat.py
/usr/lib/python3.6/site-packages/argcomplete/completers.py
/usr/lib/python3.6/site-packages/argcomplete/my_argparse.py
/usr/lib/python3.6/site-packages/argcomplete/my_shlex.py
/usr/share/doc/python3-argcomplete
/usr/share/doc/python3-argcomplete/README.rst
/usr/share/licenses/python3-argcomplete
/usr/share/licenses/python3-argcomplete/LICENSE.rst

References

Summary

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