I don't know what I'm doing wrong, but this MWE does not work for me:
\documentclass[a4paper]{article}
\usepackage{pythontex}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyfoot[C]{\py{1+1}}
\begin{document}
\lipsum[1]
\end{document}
Running this (pdflatex test.tex
; pythontex3 test
) results in this error message:
$ pythontex3 test
This is PythonTeX 0.14
* PythonTeX warning
Unknown option ""
Traceback (most recent call last):
File "/home/carsten/texmf/scripts/pythontex/pythontex3.py", line 2699, in <module>
main(python=sys.version_info.major)
File "/home/carsten/texmf/scripts/pythontex/pythontex3.py", line 2622, in main
load_code_get_settings(data, temp_data)
File "/home/carsten/texmf/scripts/pythontex/pythontex3.py", line 475, in load_code_get_settings
key, val = line.split('=', 1)
ValueError: need more than 1 value to unpack
Can \py
content not be evaluated in the preamble?