How To Install texlive-pythontex on Fedora 36

In this tutorial we learn how to install texlive-pythontex in Fedora 36. texlive-pythontex is Run Python from within a document, typesetting the results

Introduction

In this tutorial we learn how to install texlive-pythontex on Fedora 36.

What is texlive-pythontex

The package allows you to enter Python code within a LaTeX document, execute the code, and access its output in the original document. Python code is only executed when it has been modified, or when it meets user-specified criteria. Code may be divided into user-defined sessions, which automatically run in parallel. Errors and warnings are synchronized with the LaTeX document, so that they refer to the document’s line numbers. External dependencies can be tracked, so that code is re-executed when the data it depends on is modified. PythonTeX also provides syntax highlighting for code in LaTeX documents via the Pygments syntax highlighter. The package provides a depythontex utility, that creates a copy of the document in which all Python code has been replaced by its output. This is useful for journal submissions, sharing documents, and conversion to other formats.

We can use yum or dnf to install texlive-pythontex on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install texlive-pythontex.

Install texlive-pythontex on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install texlive-pythontex

Install texlive-pythontex on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install texlive-pythontex

How To Uninstall texlive-pythontex on Fedora 36

To uninstall only the texlive-pythontex package we can use the following command:

sudo dnf remove texlive-pythontex

texlive-pythontex Package Contents on Fedora 36

/usr/bin/depythontex
/usr/bin/pythontex
/usr/share/licenses/texlive-pythontex
/usr/share/licenses/texlive-pythontex/lppl1.3.txt
/usr/share/texlive/texmf-dist/doc/latex/pythontex
/usr/share/texlive/texmf-dist/doc/latex/pythontex/NEWS.rst
/usr/share/texlive/texmf-dist/doc/latex/pythontex/README
/usr/share/texlive/texmf-dist/doc/latex/pythontex/pythontex.pdf
/usr/share/texlive/texmf-dist/doc/latex/pythontex/pythontex_gallery.pdf
/usr/share/texlive/texmf-dist/doc/latex/pythontex/pythontex_gallery.tex
/usr/share/texlive/texmf-dist/doc/latex/pythontex/pythontex_quickstart.pdf
/usr/share/texlive/texmf-dist/doc/latex/pythontex/pythontex_quickstart.tex
/usr/share/texlive/texmf-dist/doc/latex/pythontex/syncpdb.py
/usr/share/texlive/texmf-dist/scripts/pythontex
/usr/share/texlive/texmf-dist/scripts/pythontex/depythontex.py
/usr/share/texlive/texmf-dist/scripts/pythontex/depythontex3.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex3.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex_2to3.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex_engines.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex_install.py
/usr/share/texlive/texmf-dist/scripts/pythontex/pythontex_utils.py
/usr/share/texlive/texmf-dist/tex/latex/pythontex
/usr/share/texlive/texmf-dist/tex/latex/pythontex/pythontex.sty

References

Summary

In this tutorial we learn how to install texlive-pythontex on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).