How To Install python3-jinja2 on CentOS 8
Introduction
In this tutorial we learn how to install python3-jinja2
on CentOS 8.
What is python3-jinja2
Jinja2 is a template engine written in pure Python. It provides a Django inspired non-XML syntax but supports inline expressions and an optional sandboxed environment. If you have any exposure to other text-based template languages, such as Smarty or Django, you should feel right at home with Jinja2. It’s both designer and developer friendly by sticking to Python’s principles and adding functionality useful for templating environments.
We can use yum
or dnf
to install python3-jinja2
on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install python3-jinja2.
Install python3-jinja2 on CentOS 8 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install python3-jinja2
using dnf
by running the following command:
sudo dnf -y install python3-jinja2
Install python3-jinja2 on CentOS 8 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install python3-jinja2
using yum
by running the following command:
sudo yum -y install python3-jinja2
How To Uninstall python3-jinja2 on CentOS 8
To uninstall only the python3-jinja2
package we can use the following command:
sudo dnf remove python3-jinja2
python3-jinja2 Package Contents on CentOS 8
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/PKG-INFO
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/SOURCES.txt
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/dependency_links.txt
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/entry_points.txt
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/not-zip-safe
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/requires.txt
/usr/lib/python3.6/site-packages/Jinja2-2.10.1-py3.6.egg-info/top_level.txt
/usr/lib/python3.6/site-packages/jinja2
/usr/lib/python3.6/site-packages/jinja2/__init__.py
/usr/lib/python3.6/site-packages/jinja2/__pycache__
/usr/lib/python3.6/site-packages/jinja2/__pycache__/__init__.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/__init__.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/_compat.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/_compat.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/_identifier.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/_identifier.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/asyncfilters.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/asyncfilters.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/asyncsupport.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/asyncsupport.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/bccache.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/bccache.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/compiler.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/compiler.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/constants.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/constants.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/debug.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/debug.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/defaults.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/defaults.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/environment.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/environment.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/exceptions.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/exceptions.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/ext.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/ext.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/filters.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/filters.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/idtracking.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/idtracking.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/lexer.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/lexer.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/loaders.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/loaders.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/meta.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/meta.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/nativetypes.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/nativetypes.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/nodes.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/nodes.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/optimizer.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/optimizer.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/parser.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/parser.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/runtime.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/runtime.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/sandbox.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/sandbox.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/tests.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/tests.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/utils.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/utils.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/visitor.cpython-36.opt-1.pyc
/usr/lib/python3.6/site-packages/jinja2/__pycache__/visitor.cpython-36.pyc
/usr/lib/python3.6/site-packages/jinja2/_compat.py
/usr/lib/python3.6/site-packages/jinja2/_identifier.py
/usr/lib/python3.6/site-packages/jinja2/asyncfilters.py
/usr/lib/python3.6/site-packages/jinja2/asyncsupport.py
/usr/lib/python3.6/site-packages/jinja2/bccache.py
/usr/lib/python3.6/site-packages/jinja2/compiler.py
/usr/lib/python3.6/site-packages/jinja2/constants.py
/usr/lib/python3.6/site-packages/jinja2/debug.py
/usr/lib/python3.6/site-packages/jinja2/defaults.py
/usr/lib/python3.6/site-packages/jinja2/environment.py
/usr/lib/python3.6/site-packages/jinja2/exceptions.py
/usr/lib/python3.6/site-packages/jinja2/ext.py
/usr/lib/python3.6/site-packages/jinja2/filters.py
/usr/lib/python3.6/site-packages/jinja2/idtracking.py
/usr/lib/python3.6/site-packages/jinja2/lexer.py
/usr/lib/python3.6/site-packages/jinja2/loaders.py
/usr/lib/python3.6/site-packages/jinja2/meta.py
/usr/lib/python3.6/site-packages/jinja2/nativetypes.py
/usr/lib/python3.6/site-packages/jinja2/nodes.py
/usr/lib/python3.6/site-packages/jinja2/optimizer.py
/usr/lib/python3.6/site-packages/jinja2/parser.py
/usr/lib/python3.6/site-packages/jinja2/runtime.py
/usr/lib/python3.6/site-packages/jinja2/sandbox.py
/usr/lib/python3.6/site-packages/jinja2/tests.py
/usr/lib/python3.6/site-packages/jinja2/utils.py
/usr/lib/python3.6/site-packages/jinja2/visitor.py
/usr/share/doc/python3-jinja2
/usr/share/doc/python3-jinja2/AUTHORS
/usr/share/doc/python3-jinja2/CHANGES.rst
/usr/share/doc/python3-jinja2/examples
/usr/share/doc/python3-jinja2/examples/basic
/usr/share/doc/python3-jinja2/examples/basic/cycle.py
/usr/share/doc/python3-jinja2/examples/basic/debugger.py
/usr/share/doc/python3-jinja2/examples/basic/inheritance.py
/usr/share/doc/python3-jinja2/examples/basic/templates
/usr/share/doc/python3-jinja2/examples/basic/templates/broken.html
/usr/share/doc/python3-jinja2/examples/basic/templates/subbroken.html
/usr/share/doc/python3-jinja2/examples/basic/test.py
/usr/share/doc/python3-jinja2/examples/basic/test_filter_and_linestatements.py
/usr/share/doc/python3-jinja2/examples/basic/test_loop_filter.py
/usr/share/doc/python3-jinja2/examples/basic/translate.py
/usr/share/doc/python3-jinja2/examples/bench.py
/usr/share/doc/python3-jinja2/examples/profile.py
/usr/share/doc/python3-jinja2/examples/rwbench
/usr/share/doc/python3-jinja2/examples/rwbench/django
/usr/share/doc/python3-jinja2/examples/rwbench/django/_form.html
/usr/share/doc/python3-jinja2/examples/rwbench/django/_input_field.html
/usr/share/doc/python3-jinja2/examples/rwbench/django/_textarea.html
/usr/share/doc/python3-jinja2/examples/rwbench/django/index.html
/usr/share/doc/python3-jinja2/examples/rwbench/django/layout.html
/usr/share/doc/python3-jinja2/examples/rwbench/djangoext.py
/usr/share/doc/python3-jinja2/examples/rwbench/genshi
/usr/share/doc/python3-jinja2/examples/rwbench/genshi/helpers.html
/usr/share/doc/python3-jinja2/examples/rwbench/genshi/index.html
/usr/share/doc/python3-jinja2/examples/rwbench/genshi/layout.html
/usr/share/doc/python3-jinja2/examples/rwbench/jinja
/usr/share/doc/python3-jinja2/examples/rwbench/jinja/helpers.html
/usr/share/doc/python3-jinja2/examples/rwbench/jinja/index.html
/usr/share/doc/python3-jinja2/examples/rwbench/jinja/layout.html
/usr/share/doc/python3-jinja2/examples/rwbench/mako
/usr/share/doc/python3-jinja2/examples/rwbench/mako/helpers.html
/usr/share/doc/python3-jinja2/examples/rwbench/mako/index.html
/usr/share/doc/python3-jinja2/examples/rwbench/mako/layout.html
/usr/share/doc/python3-jinja2/examples/rwbench/rwbench.py
/usr/share/doc/python3-jinja2/ext
/usr/share/doc/python3-jinja2/ext/Vim
/usr/share/doc/python3-jinja2/ext/Vim/jinja.vim
/usr/share/doc/python3-jinja2/ext/django2jinja
/usr/share/doc/python3-jinja2/ext/django2jinja/django2jinja.py
/usr/share/doc/python3-jinja2/ext/django2jinja/example.py
/usr/share/doc/python3-jinja2/ext/django2jinja/templates
/usr/share/doc/python3-jinja2/ext/django2jinja/templates/index.html
/usr/share/doc/python3-jinja2/ext/django2jinja/templates/layout.html
/usr/share/doc/python3-jinja2/ext/django2jinja/templates/subtemplate.html
/usr/share/doc/python3-jinja2/ext/djangojinja2.py
/usr/share/doc/python3-jinja2/ext/inlinegettext.py
/usr/share/doc/python3-jinja2/ext/jinja.el
/usr/share/doc/python3-jinja2/html
/usr/share/doc/python3-jinja2/html/_sources
/usr/share/doc/python3-jinja2/html/_sources/api.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/changelog.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/extensions.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/faq.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/index.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/integration.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/intro.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/latexindex.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/nativetypes.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/sandbox.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/switching.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/templates.rst.txt
/usr/share/doc/python3-jinja2/html/_sources/tricks.rst.txt
/usr/share/doc/python3-jinja2/html/_static
/usr/share/doc/python3-jinja2/html/_static/ajax-loader.gif
/usr/share/doc/python3-jinja2/html/_static/basic.css
/usr/share/doc/python3-jinja2/html/_static/comment-bright.png
/usr/share/doc/python3-jinja2/html/_static/comment-close.png
/usr/share/doc/python3-jinja2/html/_static/comment.png
/usr/share/doc/python3-jinja2/html/_static/doctools.js
/usr/share/doc/python3-jinja2/html/_static/documentation_options.js
/usr/share/doc/python3-jinja2/html/_static/down-pressed.png
/usr/share/doc/python3-jinja2/html/_static/down.png
/usr/share/doc/python3-jinja2/html/_static/file.png
/usr/share/doc/python3-jinja2/html/_static/jinja-small.png
/usr/share/doc/python3-jinja2/html/_static/jinja.css
/usr/share/doc/python3-jinja2/html/_static/jquery-3.2.1.js
/usr/share/doc/python3-jinja2/html/_static/jquery.js
/usr/share/doc/python3-jinja2/html/_static/minus.png
/usr/share/doc/python3-jinja2/html/_static/plus.png
/usr/share/doc/python3-jinja2/html/_static/pygments.css
/usr/share/doc/python3-jinja2/html/_static/searchtools.js
/usr/share/doc/python3-jinja2/html/_static/underscore-1.3.1.js
/usr/share/doc/python3-jinja2/html/_static/underscore.js
/usr/share/doc/python3-jinja2/html/_static/up-pressed.png
/usr/share/doc/python3-jinja2/html/_static/up.png
/usr/share/doc/python3-jinja2/html/_static/websupport.js
/usr/share/doc/python3-jinja2/html/api.html
/usr/share/doc/python3-jinja2/html/changelog.html
/usr/share/doc/python3-jinja2/html/extensions.html
/usr/share/doc/python3-jinja2/html/faq.html
/usr/share/doc/python3-jinja2/html/genindex.html
/usr/share/doc/python3-jinja2/html/index.html
/usr/share/doc/python3-jinja2/html/integration.html
/usr/share/doc/python3-jinja2/html/intro.html
/usr/share/doc/python3-jinja2/html/latexindex.html
/usr/share/doc/python3-jinja2/html/nativetypes.html
/usr/share/doc/python3-jinja2/html/objects.inv
/usr/share/doc/python3-jinja2/html/py-modindex.html
/usr/share/doc/python3-jinja2/html/sandbox.html
/usr/share/doc/python3-jinja2/html/search.html
/usr/share/doc/python3-jinja2/html/searchindex.js
/usr/share/doc/python3-jinja2/html/switching.html
/usr/share/doc/python3-jinja2/html/templates.html
/usr/share/doc/python3-jinja2/html/tricks.html
/usr/share/licenses/python3-jinja2
/usr/share/licenses/python3-jinja2/LICENSE
References
Summary
In this tutorial we learn how to install python3-jinja2
on CentOS 8 using yum and dnf.