Lar*_*aro 5 python latex pygments pygmentize
我尝试使用两者在Debian 9上安装pygments,但没有方法使它在命令行上运行。apt-get install python3-pygmentspip install Pygments
我怀疑我的PATH不包含安装路径。我将/usr/lib/python3/dist-packages/添加到我的PATH中,因为 pygments 包安装在那里,但当然这不是一个解决方案,因为那里没有单个 bin 或可执行文件。那里有脚本,但没有一个具有“x”权限。
那么我应该将什么目录添加到我的PATH变量中?apt-file list python3-pygments仅显示之前添加的目录(/usr/lib/python3/dist-packages/)。
也许问题与我的PATH无关。我不知道。但我需要完成这项工作才能使用minted Latex 包。pygments网站上有一句话让我觉得我需要安装其他东西:
如果您安装了 pygmentize 脚本,您可以从 shell 使用 Pygments。
我希望他们能写更多关于如何安装所述脚本的文章,因为我在他们的网站或互联网上找不到任何内容。据我在网上看到的,大多数人只是正常安装 pygments,然后他们就可以使用 minted,所以我对这个“脚本”持怀疑态度。
小智 5
终于我找到了!我卸载并重新安装,这次我收到了有用的警告:
Installing collected packages: Pygments
WARNING: The script pygmentize.exe is installed in 'C:\Users\CarmanBr\AppData\Local\Programs\Python\Python310\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Run Code Online (Sandbox Code Playgroud)
更新了我的路径,现在它终于可以工作了!