# Problem with Pythontex

I would like to use Pythontex. I am on Mac texlive2019, python 3.7 (anaconda) TeXShop V 4.31 I followed all that was written on the documentation for the installation but impossible to have the result 😭

\documentclass[12pt,french]{article}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{pythontex}
\setlength{\parindent}{0pt}

\begin{document}

\begin{pyverbatim}
import math
def racine(a):
return math.sqrt(a)
print(racine(9))
\end{pyverbatim}
\bigskip
Résultat :
\begin{pycode}
import math
def racine(a):
return math.sqrt(a)
print(racine(9))
\end{pycode}
\begin{pyconsole}
var = 1 + 1
var
\end{pyconsole}
\end{document}

• What does echo \$PATH return in Terminal? – Herb Schulz Aug 4 at 15:38

Please download the file Pythontex-platexmkrc.zip from https://herbs.github.io and unzip it. That produces a platexmkrc file that contains information for TeXShop's pdflatexmk engine on how to process the files created by pythontex. Place that file in the same folder as your Source file. Then add the line % !TEX program = pdflatexmk to the top of your source file (it tells TeXShop to use the pdflatexmk engine to typeset the file) and typeset the file using Typeset->Typeset (Cmd-T).
• Sigh... There is one line in the platexmkrc file that will need editing. Drop the platexmkrc file on the TeXShop icon to open it for editing in TeXShop. Change anacond2 to anaconda3 and save it. – Herb Schulz Aug 4 at 16:54
• Please try to run the command sudo /usr/local/bin/easy_install Pygments in Terminal. It will ask for your admin password. This installs another version of Pygments where it might be found more easily. – Herb Schulz Aug 5 at 16:03