pythoncx-freezepygments

cx_Freeze: Python error main script. Module not found error: no module named pygments.lexers.python


I am trying to create a file .exe from a .py file with cx_Freeze. I had successifully build the setup file but when I run the .exe file, it returns me this error:

-I tried to install again Python

-I tried to update pygments but it says that the requirements are already satisfied

Any suggestions? Help this poor newborn programmer


Solution

  • You need to manually include missing module in cx freeze packages. Refer answer here for example code -

    How do I convert my pygame program which has multiple python scripts and images to a exe?