エラーメッセージは
Matplotlib created a temporary cache directory at /tmp/matplotlib-nmam8fv7 because there was an issue with the default path (/var/www/.cache/matplotlib); it is highly recommended to set the MPLCONFIGDIR environment variable
みたいな感じ
/var/www/.cache/matplotlib に書き込めないから一時的に別の場所にファイルを作ったよとエラー(ワーニング?)が出る
cgi-binじゃないときはこれで解決できる
ホームディレクトリに書き出す場所を作る
sudo mkdir -p ~/.config/matplotlib
sudo chmod -R 777 /home/【username】/.config/matplotlib
MPLCONFIGDIR という変数を設定する方法
Matplotlib created a temporary config/cache directory
これもやってみたが、特に改善はしなかった・・・
cgi-binから/var/www/.cache/matplotlibを書き込めるようにした
sudo chown -R www-data:www-data /var/www/.cache/
これでワーニングメッセージは出なくなった
ランキング参加中です
↓クリックしていただけると嬉しいです〜
