Py2Exe "Fehlende Module"

Ich versuche meine konvertieren python-Projekt in eine exe-Datei, die mithilfe von Py2Exe. Es ist erwähnenswert, dass cx_freeze klagt über die gleichen drei "fehlenden Module", zusammen mit mehreren Dutzend anderen. Das problem ist, dass niemand überall erzählt, wie diese zu lösen.

Ich bin aufbauend auf MS Windows XP 32-bit (in VirtualBox).

C:\Documents and Settings\Jason\Desktop\redstring2>python setup.py py2exe
running py2exe
running build_py
creating build
creating build\lib
copying redstring.py -> build\lib

  3 missing Modules
  ------------------
? readline                            imported from cmd, code, pdb
? win32api                            imported from platform
? win32con                            imported from platform
Building shared code archive 'dist\library.zip'.
Copy c:\windows\system32\python34.dll to dist
Copy C:\Python34\DLLs\select.pyd to dist\select.pyd
Copy C:\Python34\DLLs\_ssl.pyd to dist\_ssl.pyd
Copy C:\Python34\DLLs\_ctypes.pyd to dist\_ctypes.pyd
Copy C:\Python34\DLLs\_lzma.pyd to dist\_lzma.pyd
Copy C:\Python34\DLLs\_hashlib.pyd to dist\_hashlib.pyd
Copy C:\Python34\DLLs\pyexpat.pyd to dist\pyexpat.pyd
Copy C:\Python34\DLLs\_socket.pyd to dist\_socket.pyd
Copy C:\Python34\DLLs\_bz2.pyd to dist\_bz2.pyd
Copy C:\Python34\DLLs\unicodedata.pyd to dist\unicodedata.pyd

Meine setup.py ist wie folgt.

#!/usr/bin/python python

from setuptools import setup
import py2exe

setup(name="Redstring",
    version="2.0",
    description="REDundant STRING generator",
    author="MousePaw Labs",
    url="http://www.mousepawgames.com/",
    author_email="[email protected]",
    data_files=[("", ["redstring.png", "redstring_interface.glade"])],
    py_modules=["redstring"],
    )

Dies ist ein Python 3.4 Projekt mit GTK+ 3 (Baujahr Waldwiese). Es läuft einfach gut laufen, die auf Ubuntu, und von python redstring.py, aber ich Schaffe es das Ding zu kompilieren ab .exe.

Bisher habe ich versucht import platform, from platform import win32api, und alle die, wie sowohl redstring.py und setup.py zusammen mit dem Import-Plattform mit py2exe Optionen in der setup-Datei.

  • Hat das Projekt unter windows laufen?
  • Affirmative. python redstring.py in Windows XP cmd bringt es ohne Probleme auf allen.
  • Haben Sie versucht, dieses : stackoverflow.com/questions/10098444/... ?
  • Gut, wenn du meinst, mit dem py2exe option 'include': 'Bahnsteig', ja, während es nicht werfen keine Fehler, es ist auch nicht das problem lösen.
InformationsquelleAutor CodeMouse92 | 2014-11-11
Schreibe einen Kommentar