Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The minted package of LaTeX uses the Python module "pygmentize" to colour the code snippets.
- From time to time, this could arise:
- ```
- para@N551JK-ULB:~/Documents/ULB/ELECH310/2015-2016/examen/exam_test_cls$ pygmentize
- Traceback (most recent call last):
- File "/usr/local/bin/pygmentize", line 5, in <module>
- from pkg_resources import load_entry_point
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
- @_call_aside
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
- f(*args, **kwargs)
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
- working_set = WorkingSet._build_master()
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 637, in _build_master
- return cls._build_from_requirements(__requires__)
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 650, in _build_from_requirements
- dists = ws.resolve(reqs, Environment())
- File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 829, in resolve
- raise DistributionNotFound(req, requirers)
- pkg_resources.DistributionNotFound: The 'Pygments==2.1' distribution was not found and is required by the application
- ```
- Upgrading pygmentize won't do it, the script is broken. You need to locate it and manually change the "pygments" version to the one you have installed on your system (in my case 2.1.3 instead of the 2.1 required in the script).
- ```
- $ pip freeeze
- ...
- Pygments==2.1.3
- ...
- $ sudo vim `which pygmentize`
- ```
- Now it works.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement