在终端中运行命令
pythontex
时,出现此错误:
Traceback (most recent call last):
File "/Library/TeX/texbin/pythontex", line 50, in <module>
import pythontex2 as pythontex
File "/usr/local/texlive/2021/texmf-dist/scripts/pythontex/pythontex2.py", line 61, in <module>
from pygments.styles import get_all_styles
ImportError: No module named pygments.styles
这让我困惑的原因有两个:
pythontex2
;pygments
?我正在使用配备 M1 的 MacBook,如果这有用的话。
提前谢谢您。
你必须安装 Pygments。 使用:在你的 venv/env 中 pip install pygments