Python コードの EXE 化2019年12月27日 | |
はじめにPython のコードを Windows で手軽に実行できるように EXE 化する方法について。ちなみに、ソースコード隠蔽には使えないらしい (頑張れば見えてしまうので)。 環境Windows 10 64 bit Python コードの EXE 化auto-py-to-exe を使う。これは内部で PyInstaller を用いている。 インストールおよび実行 >pip install auto-py-to-exe >auto-py-to-exe 試しに変換してみると、次のようなエラーが出た。
File "c:\users\xxxxx\appdata\local\continuum\anaconda3\lib\site-packages\PyInstaller\compat.py", line 427, in exec_command
out = out.decode(encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x83 in position 155: invalid start byte
combat.py を書き換える。
#out = out.decode(encoding)
out = out.decode(encoding, errors='ignore')
キャッシュを消して再実行。
参考 | |
| PENGUINITIS | |