I have a Python app which works very nicely, inside of which I do something like:
from pygments import lexers
then...
testing = lexers.PythonLexer()
Just running the script works great and I get a new instance of the PythonLexer. However... when I make a build folder for the app using PyInstaller and then run it, that line fails:
File "blah\myfile", line 31, in __init__ AttributeError: 'module' object has no attribute 'PythonLexer'
Any ideas? I think it's because pygments is somehow building up its objects at runtime from some files that are missing in my PyInstaller build folder, but I can't quite see how.
The app is using Kivy, but I actually don't think that's too much to do with this issue.