Troubleshooting
This page describes solutions to known issues.
Cannot find mmg
command in Windows
$ pip3 install mmg
...
WARNING: The script mmg.exe is installed in 'C:\Users\...\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed mmg-2.0.1
This warning appears because the path to mmg.exe
installed by pip is not registered in the environment variable PATH
.
To resolve this, first press the Windows key to open the search box and search for "advanced system settings" and click it.

Then click the "Environment Variables" button in the bottom right.

Select the PATH
variable as shown in the image below and click the "Edit" button. Click the "New" button to add the path shown in the warning message. The path may be different for each user, so make sure to add your own path.
Click "OK" in all windows to complete the setup.

Now that the path has been added to the PATH
variable, you can open the command prompt and use the mmg
command.
WeasyPrint cannot import external libraries
Symptom: When you enter the mmg
command in Windows PowerShell, the following error occurs.
PS D:\> mmg --version
-----
WeasyPrint could not import some external libraries. Please carefully follow the installation steps before reporting an issue:
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#installation
https://doc.courtbouillon.org/weasyprint/stable/first_steps.html#troubleshooting
-----
Traceback (most recent call last):
.....
OSError: cannot load library '.....': .....
Cause: This is a problem that occurs when GTK is not properly installed on Windows. This can also occur if you install GTK before installing Python.
Solution: Download and install the latest GTK3 installer.
Reference: WeasyPrint > First steps > Installation > Windows
GLib-GIO-WARNING warning is output on Windows
Symptom: When you use mmg
in Windows PowerShell, the following warning is output.
GLib-GIO-WARNING **: 13:19:49.232: Unexpectedly, UWP app `*******.*******_0.0.00.0_****__************' (AUMId `*******.*******_************!App') supports 00 extensions but has no verbs
This warning message does not affect the operation of MMG, so you can ignore it.
Solution: Remove or reinstall the Windows app mentioned in the warning message from Microsoft Store.
For example, remove or reinstall the Clipchamp
app in the following case.
GLib-GIO-WARNING **: 13:19:49.232: Unexpectedly, UWP app `Clipchamp.Clipchamp_2.7.10.0_neutral__yxz26nhyzhsrt' (AUMId `Clipchamp.Clipchamp_yxz26nhyzhsrt!App') supports 41 extensions but has no verbs
Reference: https://stackoverflow.com/a/71053742/17167856
Markdown files are not converted properly when HTML tags are included
To generate HTMLs, MMG uses the markdown package for markdown files. And when generating PDFs, it first converts to HTML and then converts to PDF.
However, when markdown contains HTML tags, it may not be converted properly in the following cases. The reason for this is that the markdown package requires the syntax described in Markdown in HTML Extension.
<div align="center">
Hello, world!
</div>
After you fix it as follows, it will be converted properly.
<div align="center" markdown>
Hello, world!
</div>