最近、cx_freeze を使用して .exe プログラムを作成しようとしましたが、通常は動作します。しかし、jsonpickle をモジュールとして使い始めたところ、プログラムが機能しなくなりました。それらはアイドル状態で実行されますが、それらを .exe に変換すると、実行を拒否します。何が問題になるかわかりません。また、実際にはそのモジュールを使用しているにもかかわらず、jsonpickle はモジュールではないこともわかります。私の setup.py ファイルが必要な場合は、次のとおりです。
import cx_Freeze, sys
from cx_Freeze import setup, Executable
exe=Executable(
script="gtn.py",
base="Console",
icon = "gtn.ico",
)
includefiles=[]
includes=["re"]
excludes=[]
packages=[]
setup(
version = "14w03a",
description = "oysterDev©",
author = "Austin Hargis",
name = "GTN",
options = {'build_exe': {'excludes':excludes,'packages':["jsonpickle"],'include_files':includefiles}},
executables = [exe]
)
.exe を実行しようとすると、次のエラーが表示されます。
C:\Users\Austin\Desktop\build\exe.win32-3.4>gtn.exe
Traceback (most recent call last):
File "c:\python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27
, in <module>
exec(code, m.__dict__)
File "gtn.py", line 3, in <module>
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2214, in _find_a
nd_load
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2201, in _find_a
nd_load_unlocked
ImportError: No module named 'jsonpickle'