0

Python スクリプトを作成し、Windows 32 ビット OS で py2exe を使用して exe を生成しました。生成された exe ファイルを実行しようとすると、次のエラーが発生します。


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

どんな種類の助けもいただければ幸いです!!!

ありがとう、ラム

4

1 に答える 1

0

optionsに引数を追加することで、モジュールを含めることができますsetup:

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

上記のコードで異なる可能性がある唯一の点は、 とxml.etree.ElementTreeを置き換える必要がある可能性があることです。これらについてはよくわかりません。xmllxml.etreelxml

于 2016-10-05T16:32:14.980 に答える