id summary reporter owner description type status priority milestone component version resolution keywords cc port 50569 Error in pygments after upgrade from 2.0.2_0 to 2.1_0 rpspringuel stromnov "I use pygments through the MacPorts installation py-pygments package and after updating from 2.0.2 to 2.1 yesterday (a process that went off without a hitch) have run into an error. When I invoke `pygmentize -V` at the command-line I get the following: {{{ Traceback (most recent call last): File ""/opt/local/bin/pygmentize"", line 5, in from pkg_resources import load_entry_point File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 3138, in @_call_aside File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 3124, in _call_aside f(*args, **kwargs) File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 3151, in _initialize_master_working_set working_set = WorkingSet._build_master() File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 663, in _build_master return cls._build_from_requirements(__requires__) File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 676, in _build_from_requirements dists = ws.resolve(reqs, Environment()) File ""/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pkg_resources/__init__.py"", line 849, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'Pygments==2.0.2' distribution was not found and is required by the application }}} That last line tells me `pygmentize` is looking for the wrong version. If I revert the py27-pygments (which py-pygments depends on) package to 2.0.2_0 then the error goes away, but of course that's because I'm using the old version (I do not need to revert the py-pygments package). Using terminal for further investigation I did/got the following: {{{ cd / sudo find . -name ""pygmentize"" -print -xdev ./opt/local/bin/pygmentize ./opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/pygmentize ./usr/local/bin/pygmentize }}} Invoking each of these commands specifically, the first one fails with the above error while the other two work fine. Using `which` I find that the first and third are in PATH with the first (the one which fails) being first. Further testing also shows that the third is a symlink to the second, but the first is a normal file. As a final check I do/get the following: {{{ sudo find . -name ""pygments"" -print -xdev -type d ./Applications/calibre.app/Contents/Resources/Python/site-packages/pygments ./opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pygments }}} The first pygments site-package is safely tucked away inside an application bundle, so it's shouldn't be causing the problems. The second is the MacPorts installed one. Looking inside it, I can clearly see that the version is 2.1 after the update. My conclusion from all this is that `/opt/local/bin/pygmentize` was not updated properly when py-pygments (and py27-pygments) was updated from 2.0.2 to 2.1. What's my best course of action for fixing this problem?" defect closed Normal ports 2.3.4 invalid petrrr py27-pygments