Pyinstallerでexe化するとsavefigで保存できない

実現したいこと

Matplotlibのsavefig関数でPDFファイルで保存したいのですが、
Pyinstallerでexe化したファイルを実行してもファイルが出力されません。
ファイルの拡張子が.ipynbや.pyの時は出力されました。

調べてみたところ、https://github.com/pyinstaller/pyinstaller/issues/5356が
参考になるかと思いましたが、分からないのでご教示頂けないでしょうか。

該当のソースコード

Python

1 234plt.savefig("ファイル名.pdf")5plt.show()

補足情報(FW/ツールのバージョンなど)

conda version : 23.1.0
python : 3.10.8
pyinstaller : 5.7.0
matplotlib : 3.6.3

コメントを投稿

0 コメント