Py2Exe “Módulos ausentes”
Estou tentando converter meu projeto python em um exe usando Py2Exe. Vale a pena notar que o cx_freeze reclama dos mesmos três "módulos ausentes", juntamente com várias dezenas de outros. O problema é que ninguém em qualquer lugar diz como resolver isso.
Estou construindo no MS Windows XP de 32 bits (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
Minhassetup.py
é o seguinte.
#!/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"],
)
Este é um projeto do Python 3.4 usando GTK + 3 (construído no Glade). Ele roda apenas peachy no Ubuntu e no python redstring.py, mas não consigo compilar o arquivo em um arquivo .exe.
Até agora eu tenteiimport platform
, from platform import win32api
e tudo o mais em ambosredstring.py
esetup.py
, junto com a importação da plataforma via opções py2exe no arquivo de instalação.