Matplotlib created a temporary config/cache directory at /var/www/.config/matplotlib because the default path (/tmp/matplotlib-b33qbx_v) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
This is the message I'm getting in error.log file and 504 Gateway Time out error on browser . Someone please help to resolve this issue.
import os os.environ['MPLCONFIGDIR'] = os.getcwd() + "/configs/"
before
import matplotlib
works for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With