You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, it is not under my power to uninstall matplotlib because it is installed in some shared space. Ideally, igraph would load it lazily only if needed.
The error message that you see happens when multiple processes are using Matplotlib and they all want to write to ~/.matplotlib/fontlist-v330.json at the same time. This file is built the first time Matplotlib is invoked on the system, so you can work around the problem by pre-populating the Matplotlib font cache. IMHO lazy-loading Matplotlib wouldn't solve the problem as it could still happen that two processes would want to lazy-load Matplotlib at the same time.
Another thing that you could try is to add a random delay to the startup of your process to decrease the chance of two copies of your project trying to import matplotlib at the same time.
I had a similar issue with a different software that also created certain files on first start. I worked around it by logging in to the nodes of the HPC cluster where my code would run, and starting up a single instance of this software manually, so that the file could be created correctly.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
Activity
iosonofabio commentedon Dec 5, 2023
Thanks for reporting. This is a site installation issue so there is a fundamental problem out of our control. Nonetheless, you could:
We could also lazy load like you suggested. I'm really busy these days, do you think you could open a PR? I'd be happy to assist
ntamas commentedon Dec 9, 2023
The error message that you see happens when multiple processes are using Matplotlib and they all want to write to
~/.matplotlib/fontlist-v330.jsonat the same time. This file is built the first time Matplotlib is invoked on the system, so you can work around the problem by pre-populating the Matplotlib font cache. IMHO lazy-loading Matplotlib wouldn't solve the problem as it could still happen that two processes would want to lazy-load Matplotlib at the same time.ntamas commentedon Dec 9, 2023
Another thing that you could try is to add a random delay to the startup of your process to decrease the chance of two copies of your project trying to import
matplotlibat the same time.szhorvat commentedon Dec 10, 2023
I had a similar issue with a different software that also created certain files on first start. I worked around it by logging in to the nodes of the HPC cluster where my code would run, and starting up a single instance of this software manually, so that the file could be created correctly.
stale commentedon Apr 27, 2025
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.