sisl / tufte_algorithms_book

A template for textbooks in the same style as Algorithms for Optimization
350 stars 66 forks source link

Issue with Pygments's unirange #35

Open aburousan opened 1 year ago

aburousan commented 1 year ago

When compiling the book, I am getting this error:

ImportError: cannot import name 'unirange' from 'pygments.util' (/usr/local/lib/python3.10/dist-packages/Pygments-2.15.1-py3.10.egg/pygments/util.py) make: [makefile:14: compile] Error 1 (ignored)

tawheeler commented 1 year ago

Hmm, not really sure how to assist you. FWIW the latest textbook docker container simply installs via

RUN pip3 install pygments setuptools

so there isn't anything special going on there.

cscherrer commented 1 year ago

I just hit this too. There's a discussion here that's helpful: https://github.com/sisl/tufte_algorithms_book/issues/30

For me, this ended up fixing the problem:

The issue is not with pygments. That is installed correctly. The issue is that your python installation isn't using the current version of pygments-julia: https://github.com/sisl/pygments-julia

The reason I know this is that the error message is complaining about the use of unirange, which hasn't been a part of this package since Sep 15, 2020.