2016-10-05 6 views
0

pythonスクリプトを作成し、Windows 32ビットOSでpy2exeを使用してexeを生成しました。私は、生成されたexeファイルファイルを実行しようとしていますが、私は以下のエラーを取得しています:py2exeモジュールを使用して生成されたexeファイルの実行に必要な.pydファイルの特定方法


Traceback (most recent call last): 
    File "program01.py", line 3, in <module> 
    File "PIL\Image.pyc", line 67, in <module> 
    File "PIL\_imaging.pyc", line 12, in <module> 
    File "PIL\_imaging.pyc", line 10, in __load 
ImportError: DLL load failed: The specified module could not be found. 

をするために必要なファイルを.pyd何の完全なリストを確認する方法はあります私の実行されるプログラム。

以下は、私のプログラムのインポートステートメントです。

from __future__ import division 
import os, sys, math, aggdraw 
from PIL import Image 
import xml.etree.ElementTree as ET 
import lxml.etree as LETREE 

どのようなヘルプもありがとうございます。

おかげで、 ラム

答えて

0

あなたはsetupoptions引数を追加することにより、モジュールを含めることができます。上記のコードでは異なる可能性があり

options = {'py2exe': {'bundle_files': 1, 'compressed': True, "includes" : ['os', 'sys', 'math', 'aggdraw', 'PIL', 'xml.etree.ElementTree', 'lxml.etree' ]} 
    } 

だけの事はあなたがxmlxml.etree.ElementTreeを交換する必要があるかもしれませんということで、 lxml.etreelxml私はこれらについてはあまりよく分かりません。

+0

ありがとうBoris、オプションにインクルードを追加した後。それは魅力のように働いています –

関連する問題