\documentclass{ltjsarticle}
\usepackage{pythontex}
\begin{pycode}
def fizbuz(n):
for i in range(1, n+1):
if i % 3 == 0:
print("fiz", end=' ')
else:
print(i, end=' ')
return
\end{pycode}
\begin{document}
\pyc{fizbuz(100)}
\end{document}
Running this code with Latex Workshop(on VSCode), I have the error: "env: python: No such file or directory". My setting of Latex Workshop is following. How can I solve this problem?
P.S. I ran the above code on my M1 Mac and I surely installed python3.8 and pygments. The latex engine is LuaLaTeX (TeXLive2021).
"latex-workshop.latex.recipes": [
{
"name": "toolchain",
"tools": ["lualatex", "pythontex", "lualatex"]
}
],
"latex-workshop.latex.tools": [
{
"name": "lualatex",
"command": "lualatex",
"args": [
"--cmdx",
"-file-line-error",
"-synctex=1",
"-interaction=nonstopmode",
"-halt-on-error",
"%DOC%"
]
},
{
"name": "pythontex",
"command": "pythontex",
"args": [
"%DOC%"
]
},
]